Syncing strategy

Sebastian Spaeth Sebastian at SSpaeth.de
Sun Dec 12 15:07:46 UTC 2010


On Sun, 12 Dec 2010 13:19:24 +0100, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
 > On Fri, Dec 10, 2010 at 10:42:51PM +0100, Sebastian Spaeth wrote:
> > 
> > Why is /tmp not a good temporary directory? I am using pythons mktmpdir
> > function to create it, run the tests and clean it up after the tests
> > finish. What's wrong with using that?
> 
> Inspection. In case of a failure we could want to inspect the results in
> the temporary path. The content of the tmp path for the test suites can
> become a "working path". It is not as volatile as the temporary path
> used for the running system. This means

We use pythons' tempdir module, which honors the TMPDIR (or whatnot)
environment variable. So it is very easy to define where those are being
created. But I find that quibbling about the right name and location of
tmpdirs is not something that is very imortant at this stage.

> This is were we are wrong I think. Setting up a true mailbox dedicated
> to the tests should be a prerequisite stage. Otherwise, the test suites
> may defeat his purpose in some cases. The code involved in the tests
> could faster differ from the real case.

These are 2 true Maildirs being used for testing the syncing strategy on
an as high level as we currently can. I strongly believe that this is
not a wrong way to test our syncing logic. Of course tests with IMAP
backends will also have to be done...

Sebastian



More information about the OfflineIMAP-project mailing list