Syncing strategy
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Sun Dec 12 12:19:24 GMT 2010
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
- have a minimal strategy to clean the tmp path;
- keep the files upon OS reboot (restarting the system shouldn't have
effect to the working state).
We don't know if /tmp is wiped at startup.
> > > So far so good.. The dificulties:
> > > - Offlineimap does not support Maildir2Maildir syncing using the
> > > high-level functionality. I understand this is due to the
> > > impossibility of doing IMAP<->Maildir1<->Maildir2<->IMAP2 (because of
> > > different UIDs being assigned to the messages by the servers). But
> > > for testing purposes that hurts me. And I will propose patches to
> > > make that easier. But that is not urgent.
> >
> > I'm not sure I understand. Why would we want syncing Maildir to Maildir?
> > We can 'cp -a' the maildirs for the tests, no?
>
> Right, we could. It would just defeat the purpose of testing syncing
> :-). I currently run syncing tests that are offline, ie no IMAP server
> involved. For that I do Maildir<->Maildir syncing.
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.
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list