Re: Directory Ops Behaving Asynchronous

Brady Kelly <[email protected]> Thu, 5 Jun 2008 13:52:37 +0200
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
Follow up:  This only seems to happen when the directory is created just
before calling a COM component that uses the directory.  It has happened
twice now on two tests.  The first time I re-ran the test without error,
before moving on to the next test instance, where I got the error again.
Unfortunately this round of testing is about a hundred fold bigger than the
last, and single test tasks run to tens of minutes.

> 2008/5/19, Brady Kelly <[email protected]>:
> > I have the following code execute:
> >
> >
> >
> >             if (Directory.Exists(exportFolder))
> >
> >             {
> >
> >                 Directory.Delete(exportFolder, true);
> >
> >             }
> >
> >             Directory.CreateDirectory(exportFolder);
> >
> >
> >
> > and then a database update, and then:
> >
> >
> >
> >             wiz57.PerformExport();
> >
> >
> >
> > Occassionally, about 1 in 20 tests I run in the IDE, PerformExport
> fails
> > because exportFolder does not exist. How can it not exist if I create
> it and
> > no exception is thrown? I can only suspect that the Directory code is
> not
> > truly synchronous, and has not completed before PerformExport
> executes.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com