MongoDB unit testing
Hi,
About 1/4 of our unit test (about 250 tests) are mongodb tests. We are currently using an external vendor (compose.io) to host our unit test db but because they are on AWS oregon region, the time it takes to go from your server (which is on Azure) to our provider is laggy and results in really really long test time.
I see that you have all flavors of SQL servers available for unit testing. Is it possible to add just a single (fresh?) instance of mongodb on the machine as a service (in your environment setting)?
You guys have an awesome service BTW.
--Huy
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 Feodor Fitsner on 02 Oct, 2014 04:35 PM
Hi Huy,
Thanks for the kind words! It's really cool to hear AppVeyor works for your projects!
MongoDB sounds like a nice addition to AV tools for integration testing. Will take a look.
Support Staff 2 Posted by Feodor Fitsner on 02 Oct, 2014 04:36 PM
Filed here: https://github.com/appveyor/ci/issues/19
3 Posted by rhoffman on 06 Nov, 2014 05:16 AM
I created a powershell Install script (Settings -> Environment -> Install Script -> Select "PS") that:
* Downloads mongodb to a temp folder
* Extracts download
* Installs mongodb as a Windows Service
* Starts the mongodb service
Here is the script:
https://gist.github.com/tekmaven/041a205276bf4d26e8f9
Support Staff 4 Posted by Feodor Fitsner on 06 Nov, 2014 05:23 AM
Wow, nice! Thank you!
Just curious how long does it take to install Mongo this way?
5 Posted by rhoffman on 06 Nov, 2014 07:07 AM
See my build: https://ci.appveyor.com/project/tekmaven/nservicebus-persistence-mongodb
The entire build takes 3 minutes 41 seconds. Based on the build log, it last took 1 minute and 25 seconds for the install script to execute. I may be able to cut 4 seconds off of it by shortening the sleep to 1 second (will require some experimentation).
This was my first experience with appveyor. Really cool and simple. I was surprised with the freedom on the build vm.
Support Staff 6 Posted by Feodor Fitsner on 06 Nov, 2014 02:51 PM
Great, thanks!
-Feodor
7 Posted by huy on 06 Nov, 2014 05:26 PM
I'm doing the same but instead of downloading the entire zip, I check in only the latest version of mongod.exe to my repo & only installing that. Saves a lot of time because it's only a fraction of that zip file.
I also have script to shutdown mongo & delete all test data. Not sure if that's necessary for the build.
--Huy
8 Posted by sergey on 01 Jul, 2015 03:36 AM
Hi Feodor!
Any update on this? Would be much better to have pre-installed Mongo instead of installing it from external sources.
Thanks!
Support Staff 9 Posted by Feodor Fitsner on 01 Jul, 2015 05:04 AM
Well, installing it from downloaded zip is less than 30 seconds. And you don't depend on our updates :)
10 Posted by Lilith River on 08 Aug, 2015 03:34 PM
We've been taking this approach for about 9 months, but suddenly mongod fails to start with error 20 - which corresponds to these:
Message: ERROR: wsastartup failed
Returned by MongoDB applications on Windows following an error in the WSAStartup function.
Message: NT Service Error
Returned by MongoDB applications for Windows due to failures installing, starting or removing the NT Service for the application.
Any changes that might have broken in?
Support Staff 11 Posted by Feodor Fitsner on 08 Aug, 2015 03:36 PM
When did it start happening? Do you use mongo pre-installed on build workers?
- Feodor
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:58 AM.