Anyone started using xUnit 2.0.0 and RavenDb.Embedded (for unit tests)?

194 views
Skip to first unread message

Justin A

unread,
Apr 5, 2015, 8:47:17 PM4/5/15
to rav...@googlegroups.com
Has anyone started using xUnit 2.0 with RavenDb.Embedded in a unit test situation?

I've just migrated a project (slowly) over to it and just added my first library that is using RavenDb.Embedded and i'm getting some really random and weird errors now.

Now before the HR krew says: Please make a repo, etc ... I'm just checking to see if there _is_ an issue .. and not just more stupid code _I've_ made.

Why am i thinking there's an issue with xUnit 2.0 and RavenDB.Embedded? xUnit has a much better Parallel story that's been really fixed up .. so I'm wondering if this new sparkle-magic is now highlighting some deficiencies in RDB.Embedded?

I'm wondering if one of the tests has locked something .. so the rest of the tests just fall over and cry...

Here's some sample errors from one xUnit-run-session (i'm running around 40 tests, where about 6 are RavenDb.Embedded tests).

NOTE: 

  <package id="RavenDB.Client" version="3.0.3599" targetFramework="net451" />
  <package id="RavenDB.Database" version="3.0.3599" targetFramework="net451" />
  <package id="RavenDB.Embedded" version="3.0.3599" targetFramework="net451" /> 

1.

Exception doesn't have a stacktrace

System.IO.IOException

The process cannot access the file 'C:\Projects\Hornet\Code\Hornet.Tests\bin\Debug\Assemblies\Lucene.Net.dll' because it is being used by another process.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at Raven.Database.Server.AssemblyExtractor.Extract(Assembly assemblyToExtractFrom, IEnumerable`1 assembliesToExtract, String location) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\AssemblyExtractor.cs: line 116
   at Raven.Database.Server.AssemblyExtractor.ExtractEmbeddedAssemblies(InMemoryRavenConfiguration configuration) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\AssemblyExtractor.cs: line 49
   at Owin.AppBuilderExtensions.UseRavenDB(IAppBuilder app, RavenDBOptions options) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\AppBuilderExtensions.cs: line 79


2.

System.Reflection.ReflectionTypeLoadExceptionUnable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
   at Raven.Database.Plugins.Catalogs.FilteredCatalog.GetExports(ImportDefinition definition) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Plugins\Catalogs\FilteredCatalog.cs: line 41
   at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore(String contractName)
   at Raven.Database.DocumentDatabase.DocumentDatabaseInitializer.ExecuteAlterConfiguration() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 1146
   at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration, TransportState recievedTransportState) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 111
   at Raven.Database.Server.RavenDBOptions..ctor(InMemoryRavenConfiguration configuration, DocumentDatabase db) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDBOptions.cs: line 54
   at Raven.Database.Server.OwinHttpServer..ctor(InMemoryRavenConfiguration config, DocumentDatabase db, Boolean useHttpServer, Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\OwinHttpServer.cs: line 24


3.

System.NullReferenceExceptionObject reference not set to an instance of an object.
   at System.Collections.Generic.HashSet`1.AddIfNotPresent(T value)
   at Raven.Abstractions.Logging.LogManager.RegisterTarget() in c:\Builds\RavenDB-Stable-3.0\Raven.Abstractions\Logging\LogManager.cs: line 66
   at Raven.Database.Server.RavenDBOptions..ctor(InMemoryRavenConfiguration configuration, DocumentDatabase db) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDBOptions.cs: line 54
   at Raven.Database.Server.OwinHttpServer..ctor(InMemoryRavenConfiguration config, DocumentDatabase db, Boolean useHttpServer, Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\OwinHttpServer.cs: line 24
   at Raven.Server.RavenDbServer.Initialize(Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDbServer.cs: line 106
   at Raven.Database.Client.EmbeddedDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddedDocumentStore.cs: line 225
   at Raven.Client.Embedded.EmbeddableDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddableDocumentStore.cs: line 138



4.

System.Reflection.ReflectionTypeLoadExceptionUnable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
   at Raven.Database.Plugins.Catalogs.FilteredCatalog.GetExports(ImportDefinition definition) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Plugins\Catalogs\FilteredCatalog.cs: line 41
   at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore(String contractName)
   at Raven.Database.DocumentDatabase.DocumentDatabaseInitializer.ExecuteAlterConfiguration() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 1146
   at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration, TransportState recievedTransportState) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 111
   at Raven.Database.Server.RavenDBOptions..ctor(InMemoryRavenConfiguration configuration, DocumentDatabase db) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDBOptions.cs: line 54
   at Raven.Database.Server.OwinHttpServer..ctor(InMemoryRavenConfiguration config, DocumentDatabase db, Boolean useHttpServer, Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\OwinHttpServer.cs: line 24
   at Raven.Server.RavenDbServer.Initialize(Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDbServer.cs: line 106
   at Raven.Database.Client.EmbeddedDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddedDocumentStore.cs: line 225
   at Raven.Client.Embedded.EmbeddableDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddableDocumentStore.cs: line 138


cheers!

-me-

Justin A

unread,
Apr 6, 2015, 6:58:54 AM4/6/15
to rav...@googlegroups.com
Oh - I forgot to add. those 4 tests (above) pass/work when i run them individually, one at a time. (which is why i'm thinking it's a Parallel issue).

Oren Eini (Ayende Rahien)

unread,
Apr 6, 2015, 8:23:40 AM4/6/15
to ravendb
Can you use the latest unstable, that should fix this issue

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Mon, Apr 6, 2015 at 1:58 PM, Justin A <jus...@adler.com.au> wrote:
Oh - I forgot to add. those 4 tests (above) pass/work when i run them individually, one at a time. (which is why i'm thinking it's a Parallel issue).

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin A

unread,
Apr 6, 2015, 8:25:45 PM4/6/15
to rav...@googlegroups.com
I'll try and give that a go later on today. Cheers Oren!

Justin A

unread,
Apr 7, 2015, 3:44:22 AM4/7/15
to rav...@googlegroups.com
Hi Oren,

I haven't had any luck trying to update to the latest unstable.

1. I thought unstables were on MyGet but failed to find anything there that's _relevant_. (last update was 4 months ago).
2. I found v 3660 on NuGet ... so I tried to update the test helpers, first.. but ..


3. RavenDb.Database a pre-release on NuGet ... ??

4. RavenDb Embedded is now flagged as obsolete? and should be replaced by RavenDb.Database (which I can't seem to pull down) ... ?


Oren Eini (Ayende Rahien)

unread,
Apr 7, 2015, 3:51:01 AM4/7/15
to ravendb
It isn't pre-release.
Also, try -DependencyVersion Highest

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


Justin A

unread,
Apr 7, 2015, 3:53:37 AM4/7/15
to rav...@googlegroups.com
http://www.nuget.org/packages/RavenDB.Database/

^ there's no version 3660 for RavenDb.Database there ... is that right?

Oren Eini (Ayende Rahien)

unread,
Apr 7, 2015, 5:20:18 AM4/7/15
to ravendb
We got this error from Nuget.
Failed to process request. 'Save changes unavailable: the gallery is currently in read only mode, with limited service. Please try again later.'

We'll try it again



Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Tue, Apr 7, 2015 at 10:53 AM, Justin A <jus...@adler.com.au> wrote:
http://www.nuget.org/packages/RavenDB.Database/

^ there's no version 3660 for RavenDb.Database there ... is that right?

--

Idsa

unread,
May 3, 2015, 1:56:13 PM5/3/15
to rav...@googlegroups.com
I experience the same problem of not being able to run all the tests (while they work individually) with XUnit/Resharper. I am confused what is the real problem? Is it XUnit or RavenDb? Going unstable with RavenDb isn't really an option for me.

вторник, 7 апреля 2015 г., 15:20:18 UTC+6 пользователь Oren Eini написал:

Justin A

unread,
Jun 2, 2015, 7:47:33 AM6/2/15
to rav...@googlegroups.com
Hi HR,

I'm still getting some bizarre errors when using RavenDb and xunit.

If i run the tests all at once, then some of them error. But when i run each of the tests that are erroring, individually ... then each one passes. So the issue is like when I'm running my tests all at the same time - maybe something new with xunit 2.0?

Here's an example stack trace ...

System.Reflection.ReflectionTypeLoadExceptionUnable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
   at Raven.Database.Plugins.Catalogs.FilteredCatalog.GetExports(ImportDefinition definition) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Plugins\Catalogs\FilteredCatalog.cs: line 41
   at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, ref IEnumerable`1 exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore(String contractName)
   at Raven.Database.DocumentDatabase.DocumentDatabaseInitializer.ExecuteAlterConfiguration() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 1210
   at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration, TransportState recievedTransportState) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\DocumentDatabase.cs: line 112
   at Raven.Database.Server.RavenDBOptions..ctor(InMemoryRavenConfiguration configuration, DocumentDatabase db) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDBOptions.cs: line 57
   at Raven.Database.Server.OwinHttpServer..ctor(InMemoryRavenConfiguration config, DocumentDatabase db, Boolean useHttpServer, Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\OwinHttpServer.cs: line 24
   at Raven.Server.RavenDbServer.Initialize(Action`1 configure) in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Server\RavenDbServer.cs: line 107
   at Raven.Database.Client.EmbeddedDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddedDocumentStore.cs: line 225
   at Raven.Client.Embedded.EmbeddableDocumentStore.Initialize() in c:\Builds\RavenDB-Stable-3.0\Raven.Database\Client\EmbeddableDocumentStore.cs: line 138
   at Raven.Tests.Helpers.RavenTestBase.NewDocumentStore(Boolean runInMemory, String requestedStorage, ComposablePartCatalog catalog, String dataDir, Boolean enableAuthentication, String activeBundles, Nullable`1 port, AnonymousUserAccessMode anonymousUserAccessMode, Action`1 configureStore, String databaseName, IEnumerable`1 indexes, IEnumerable`1 transformers, IEnumerable`1 seedData) in c:\Builds\RavenDB-Stable-3.0\Raven.Tests.Helpers\RavenTestBase.cs: line 251
   at Hornet.Tests.Services.AccountServiceFacts.DeleteAsyncNewFacts.<GivenAnExistingAccount_DeleteAsync_DeletesTheAccount>d__27.MoveNext() in AccountServiceFacts.cs: line 143
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClassc.<<InvokeTestMethodAsync>b__9>d__e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xunit.Sdk.ExecutionTimer.<AggregateAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xunit.Sdk.ExceptionAggregator.<RunAsync>d__0.MoveNext() in c:\TeamCity\buildAgent\work\74856245f07a90f0\src\xunit.core\Sdk\ExceptionAggregator.cs: line 90





 <package id="RavenDB.Client" version="3.0.3690" targetFramework="net451" />
  <package id="RavenDB.Database" version="3.0.3690" targetFramework="net451" />
  <package id="RavenDB.Tests.Helpers" version="3.0.3690" targetFramework="net451" />

  <package id="xunit.abstractions" version="2.0.0" targetFramework="net451" />
  <package id="xunit.core" version="2.0.0" targetFramework="net451" />
  <package id="xunit.extensibility.core" version="2.0.0" targetFramework="net451" />



And the unit test is nothing hard core at all..

[Fact]
public async Task GivenAnExistingAccount_DeleteAsync_DeletesTheAccount()
{
    // Arrange.
    var seedData = new IEnumerable[] { FakeAccounts.CreateFakeAccounts() };
    var documentStore = NewDocumentStore(seedData: seedData);
    var service = new AccountService();

    // Act.
    using (var asyncDocumentSession = documentStore.OpenAsyncSession())
    {
        await service.DeleteAsync(1, asyncDocumentSession);
        await asyncDocumentSession.SaveChangesAsync();
    }

    // Assert.
    using (var asyncDocumentSession = documentStore.OpenAsyncSession())
    {
        var account = await asyncDocumentSession.LoadAsync<Account>("accounts/1");
        account.ShouldBe(null);
    }
}

I'm expecting the response: Can you provide a repo? I could provide my source code privately if this issue isn't already raised as a known issue OR there's no suggestions based on the error report, above.

Oren Eini (Ayende Rahien)

unread,
Jun 2, 2015, 7:51:45 AM6/2/15
to ravendb
Retrieve the LoaderExceptions property for more information.

What does it says?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


Message has been deleted

Justin A

unread,
Jun 2, 2015, 7:58:09 AM6/2/15
to rav...@googlegroups.com
Ah - got it.. 

{"Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.":"System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

Ring any bells?

Oren Eini (Ayende Rahien)

unread,
Jun 2, 2015, 7:58:19 AM6/2/15
to ravendb
Can't you catch the exception and output the value?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Tue, Jun 2, 2015 at 2:55 PM, Justin A <jus...@adler.com.au> wrote:
That's the problem :( i can't do that when i debug it .... it works :/

Oren Eini (Ayende Rahien)

unread,
Jun 2, 2015, 8:04:24 AM6/2/15
to ravendb
Not really, no. Can you try this on a stand alone project? And can you make sure that you have the right dlls referenced?

What I _think_ is going on is that we are trying to load the same dll twice in different contextes, which causes... issues.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--

Justin A

unread,
Jun 2, 2015, 9:00:54 AM6/2/15
to rav...@googlegroups.com
Ok - I've replicated in. I can zip up this sln and email it somewhere?

this is the scenario I created to repo this.

1) create my projects and classes etc...
2) create my first test class. it looks like this...

public class AccountServiceFacts
{
    public class StoreAsyncFacts : RavenTestBase
    {
        // SNIP   
    }

    public class DeleteAsyncNewFacts : RavenTestBase
    {
        // SNIP
    }
}

3) Run all the tests ... ALL GREEN (so far so good).
4) copy and paste this ENTIRE file.
5) in this copied file rename the class to AccountServiceFactsCopy so it can compile. Now run all tests. BOOM.

Oren Eini (Ayende Rahien)

unread,
Jun 3, 2015, 2:08:38 AM6/3/15
to ravendb
Great, can you send it to sup...@ravendb.net ? Or just create an issue in the issue tracker?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--

Justin A

unread,
Jun 3, 2015, 2:28:56 AM6/3/15
to rav...@googlegroups.com
Created a private issue in the issue tracker :)

Oren Eini (Ayende Rahien)

unread,
Jun 3, 2015, 2:29:42 AM6/3/15
to ravendb
It is so private, I don't see it :-)

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Wed, Jun 3, 2015 at 9:28 AM, Justin A <jus...@adler.com.au> wrote:
Created a private issue in the issue tracker :)

--

Justin A

unread,
Jun 3, 2015, 2:32:46 AM6/3/15
to rav...@googlegroups.com
It's priv to Developers and Me.

it's issue TMP-184

(does that help?)

Oren Eini (Ayende Rahien)

unread,
Jun 3, 2015, 2:34:05 AM6/3/15
to ravendb
Yes, we just didn't get a notification on that.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--

Russell Troywest

unread,
Jun 16, 2015, 5:29:14 AM6/16/15
to rav...@googlegroups.com
I've just run into the same problem after upgrading RavenDb and XUnit.

From what I can tell it's an issue to do with running unit tests that use the EmbeddedDocumentStore in parallel . If you tag your test assembly that uses the EmbeddedDocumentStore with:

[assembly: Xunit.CollectionBehavior(DisableTestParallelization = true)]

the tests will probably run happily (at least they did for me). It's because XUnit V2 parallelises the running of unit tests by default, whereas previously this was not the case.

Justin A

unread,
Jun 16, 2015, 7:32:56 AM6/16/15
to rav...@googlegroups.com
Fix? nope.

Workaround? yep.

Why? Your tests are running one at a time :/ try doing that with hundreds or thousands.

Needs to be parallel :/

Oren Eini (Ayende Rahien)

unread,
Jun 16, 2015, 9:16:19 AM6/16/15
to ravendb
Yes, we fixed that issue in the latest unstable

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
Reply all
Reply to author
Forward
0 new messages