Running tests with Mongo2Go
It looks like mongo2go is having a hard time finding available port.
waiting for connections on port 27018
waiting for connections on port 27019
waiting for connections on port 27020
... https://ci.appveyor.com/project/borkke/opentracing-csharp-mongo/bui...
Do you have some guidance on how to run unit tests with mongo2go?
I'm using cake and very simple appveyor.yml
version: 1.0.{build}
image: Visual Studio 2015
build_script:
- cmd: powershell -Version 2.0 -ExecutionPolicy ByPass -File build.ps1 -script "build.cake" -target "Default" -verbosity normal
test: off
https://github.com/borkke/opentracing-csharp-mongo/blob/master/buil...
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 20 Nov, 2018 12:21 AM
It looks like recent builds are succeeding, is this still a problem for you?
2 Posted by borkke on 20 Nov, 2018 08:34 PM
Yes, it’s still an issue.
Same thing, mongo2go is trying to find available port. You can see this in test report.
https://ci.appveyor.com/project/borkke/opentracing-csharp-mongo/builds/20390197/tests
Tests are timing out, I’m just not failing entire bild (this is only for now).
Support Staff 3 Posted by Owen McDonnell on 21 Nov, 2018 08:06 AM
Is this running fine on your local machine?
Take a look at this discussion.
A brief look at your test code shows that you are not disposing the MondoDbRunner after each test.
Perhaps its worth trying that.
4 Posted by borkke on 21 Nov, 2018 07:34 PM
Yes it’s working fine locally.
I am not disposing MongoDbRunner intentionality. I’m trying to reuse sinle instance throughout all my tests.
I’m using this MongoFixture do deal with starting and stopping.
https://github.com/borkke/opentracing-csharp-mongo/blob/master/test/OpenTracing.Contrib.Mongo.Test/MongoFixture.cs
Support Staff 5 Posted by Owen McDonnell on 22 Nov, 2018 01:46 AM
It may work locally due to many more system resources available.
I would suggest that you access the build worker via RDP, run the tests manually, and possibly even monitor the processes that are created.
Ilya Finkelshteyn closed this discussion on 22 Jan, 2019 09:00 PM.