-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NET FX MongoDb integration tests #2490
Conversation
The fact that Windows run finished in 16 minutes made me very suspicious 😄: <?xml version="1.0" encoding="utf-8"?>
<TestRun id="10698e19-e8ff-4562-b1ce-b664ff97120a" name="runneradmin@fv-az618-438 2023-04-24 17:56:54" runUser="fv-az618-438\runneradmin" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Times creation="2023-04-24T17:56:54.4748963+00:00" queuing="2023-04-24T17:56:54.4748966+00:00" start="2023-04-24T17:56:51.9800460+00:00" finish="2023-04-24T17:56:54.4756026+00:00" />
<TestSettings name="default" id="1676d9e7-c147-45f1-a720-f62cebbc764d">
<Deployment runDeploymentRoot="runneradmin_fv-az618-438_2023-04-24_17_56_54" />
</TestSettings>
<TestLists>
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
</TestLists>
<ResultSummary outcome="Completed">
<Counters total="0" executed="0" passed="0" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
<Output>
<StdOut>[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.5+1caef2f33e (64-bit Desktop .NET 4.0.30319.42000)
[xUnit.net 00:00:01.19] Discovering: IntegrationTests (app domain = on [shadow copy], method display = ClassAndMethod, method display options = None)
[xUnit.net 00:00:01.38] Discovered: IntegrationTests (found 63 test cases)
[xUnit.net 00:00:01.39] Starting: IntegrationTests (parallel test collections = off, max threads = 2)
[xUnit.net 00:00:01.43] Finished: IntegrationTests
</StdOut>
</Output>
<RunInfos>
<RunInfo computerName="fv-az618-438" outcome="Warning" timestamp="2023-04-24T17:56:54.2755772+00:00">
<Text>[xUnit.net 00:00:01.39] IntegrationTests: Exception filtering tests: Incorrect format for TestCaseFilter Error: Missing operand. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.</Text>
</RunInfo>
<RunInfo computerName="fv-az618-438" outcome="Warning" timestamp="2023-04-24T17:56:54.3497632+00:00">
<Text>No test matches the given testcase filter `&Containers!=Linux` in D:\a\opentelemetry-dotnet-instrumentation\opentelemetry-dotnet-instrumentation\test\IntegrationTests\bin\Release\net462\IntegrationTests.dll</Text>
</RunInfo>
<RunInfo computerName="fv-az618-438" outcome="Warning" timestamp="2023-04-24T17:56:54.4159770+00:00">
<Text>Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.</Text>
</RunInfo>
</RunInfos>
</ResultSummary>
</TestRun> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will also require changing the test fixture since the Windows image for MongoDB has a different name than the one for Linux.
I think the name is the same |
Last time when I tried it was blocked by testcontainers/moby-ryuk#35 |
I'm still trying to understand where this dependency is coming from? We have ASP.NET FX tests successfully running windows containers for a long time? |
Sure, but we are doing similar things in our code base, see DockerNetworkHelper |
var mongoContainersBuilder = new ContainerBuilder() | ||
.WithImage(MongoDBImage) | ||
.WithName($"mongo-db-{port}") | ||
.WithPortBinding(port, MongoDBPort) | ||
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(MongoDBPort)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
I didn't know that it did that! I thought it required a different name. |
Why
Fixes #2451
What
Makes MongoDb integration tests to run also on Windows with Windows containers.
Tests
Existing, running also on GH windows machine.
Checklist