Unfortunately, this topic is not yet resolved for me.
The integration test now references a x86 third party library, so running it as a x64 bit process is no longer possible.
Because of this, I downloaded an x86 Oracle instant client and wanted to make the integration tests use this. How this will work on different computers I have not yet thought about ;-)
Anyway, I am making use of a derived class of xunit's `DataAttribute` for my unit tests.
This class sets the correct environment variable so that the x86 instant client is used.
Now comes the strange part:
Some of the tests pass, some fail. Those that fail, fail with the well known message "The provider is not compatible with the version of Oracle client", meaning that Oracle is not correctly configured for that process.
I don't understand how this is possible, because:
- The failing and the successful test both use the same DataAttribute
- Both tests access the database.
For testing purposes I configured NCrunch to use only one CPU and to have only one thread.
I had a look at the two spanned nCrunch.TestHost.x86.exe instances using Process Explorer.
The result is that only one of them has the PATH environment variable with the value I set. The other has the default value for PATH.
--> It looks like for some tests the setting of the environment variable is skipped. But I have no clue how that is even possible: Setting the environment variable happens in the same method that actually accesses the database.
Some more bits of information:
- Running the tests with ReSharper works
- Right-clicking on the test start symbol in the text editor and choosing "Run starting test in new task runner process" let's a previously failed test execute successfully.
Any ideas?