Comments (12)
I realized there was a new version of @noha that fixed the problem and made me understand how were the tests actually working.
However, I contributed with a minor fix that was necessary to make MongoMockTests work well:
Name: Mongo-Core-MartinDias.51
Author: MartinDias
Time: 1 April 2016, 12:24:14.905261 am
UUID: ac639434-6771-4200-bcd4-addbc68b4cb4
Ancestors: Mongo-Core-NorbertHartl.50
Mongo default instance: use a class side instance variable (default), instead of a class variable (Default), so subclasses (e.g. MongoMock) can have their own default instance.
from voyage.
But this doesn't apply to Voyage until a new MongoTalk version is released... should i?
from voyage.
I'm not sure this change is a good one. Mongo is the central access point to the functionality. If there is the need for different implementation than Mongo it would be best to do: Mongo default: aMongoThing.
Otherwise everyone that needs to access e.g. MongoMock would need to reference MongoMock directly which does not look feasible. I looked into the MongoMockTest and the proper fix seems to have instead of
setUp
super setUp.
mongo := MongoMock default.
rather use
setUp
super setUp.
mongo := MongoMock new.
As long as we hold a reference to the mongo implementation there is no need to use the singleton. This way the tests are left alone even if the Mongo singleton points to a real database.
from voyage.
By using new the reset is unnecessary, too. I should have had that idea before
from voyage.
Name: Mongo-Tests-Core-NorbertHartl.6
Author: NorbertHartl
Time: 1 April 2016, 10:01:03.427534 am
UUID: d7868065-e04e-43b8-8545-e83031d165e1
Ancestors: Mongo-Tests-Core-NorbertHartl.5
Changed MongoMockTests to use MongoMock new instead of the singleton. This removes side effects and the need for resetting the MongoMock instance
from voyage.
Great! This makes total sense. Thanks. We can add it to Voyage travis tests after we release a new version.
However, I still have MongoTest>>testCollection and another in yellow. @noha did you said in other thread that you fixed them? maybe i missunderstood
from voyage.
In my image all tests are green. I have latest 5.0 image and vm
from voyage.
I realized my change to Mongo class wasn't reverted yet. I just reverted it:
Name: Mongo-Core-MartinDias.54
Author: MartinDias
Time: 6 May 2016, 12:24:03.404015 am
UUID: 9d5e9d08-91e5-4289-8f66-ce62334caa7e
Ancestors: Mongo-Core-HolgerHansPeterFreyther.53
Reverting this change I did in Mongo class:
Name: Mongo-Core-MartinDias.51
Author: MartinDias
Time: 1 April 2016, 12:24:14.905261 am
UUID: ac639434-6771-4200-bcd4-addbc68b4cb4
Ancestors: Mongo-Core-NorbertHartl.50
Mongo default instance: use a class side instance variable (default), instead of a class variable (Default), so subclasses (e.g. MongoMock) can have their own default instance.
from voyage.
Hi @noha
Still testGetNoneExistingCollection and testCollections are yellow here. The cause is the same in both cases: "database collections" is empty. In the shell, however, I see that test db has the expected collection...
- Both tests failing:
MongoTest run: #testCollections.
"--> 1 run, 0 passes, 0 skipped, 0 expected failures, 1 failures, 0 errors, 0 unexpected passes"
MongoTest run: #testGetNoneExistingCollection.
"--> 1 run, 0 passes, 0 skipped, 0 expected failures, 1 failures, 0 errors, 0 unexpected passes"
- I have latest versions:
(MCWorkingCopy allManagers
collect: [ :each | each versionInfo name ]
thenSelect: [ :each | each beginsWith: 'Mongo' ])
"--> #('Mongo-Queries-TorstenBergmann.1' 'Mongo-BSON-MartinDias.46' 'Mongo-Tests-Core-NorbertHartl.6' 'Mongo-Tests-Queries-TorstenBergmann.2' 'Mongo-Squeak-MartinDias.18' 'Mongo-Pharo-Tools-TorstenBergmann.7' 'Mongo-Tests-BSON-MartinDias.2' 'Mongo-Core-MartinDias.54')"
- I downloaded 50+vm of today:
Pharo5.0
Latest update: #50750
"'CoInterpreter VMMaker.oscog-eem.1855 uuid: d8e4a3c2-a3bf-4adc-b224-8012903a1ef4 May 4 2016
StackToRegisterMappingCogit VMMaker.oscog-eem.1855 uuid: d8e4a3c2-a3bf-4adc-b224-8012903a1ef4 May 4 2016
https://github.com/pharo-project/pharo-vm.git Commit: b8ec25a570d7539653e1d793e97609adb509aaed Date: 2016-05-04 11:14:22 +0200 By: Esteban Lorenzano [email protected] Jenkins build #589
'"
from voyage.
I downloaded 50+vm as well and in my case the tests are all green (well, sometimes testSelectAllJustAfterRemove fails). I took voyage from github, loaded development over the ConfigurationOf and then upgraded the mongo packages to match the versions you have. That is really strange.
from voyage.
@tinchodias Can you check that again? I never could reproduce your problems and all travis builds are green
from voyage.
@noha yes, this issue makes no sense now that mongo has travis build. We can close it now and I check later.
from voyage.
Related Issues (20)
- Rewrite install script for travis HOT 1
- Refactor VOCollector
- Make save selectors with options available in object
- Unify querying interface
- P8 Win64: Voyage not installing HOT 1
- Arango: 2 tests with DNU HOT 5
- mongo: slaveOk flag should be subject to the readPreference handling HOT 2
- in VOSeedVersionGenerator >> #newVersion method throws DNU HOT 4
- VOMongoJSONSerializer have no references maybe we should remove it
- VOMongoRepository InstanceVariable host & port are unuse HOT 3
- [Voyage-mongo-tests] VOMongoTest class >> #isAbstract strange implementation HOT 2
- typo conflict on VOReadOperation & VOExternalRepository >> #synchronize: HOT 1
- why using UUID instead of VOSeedVersionGenerator HOT 2
- Mongo connections not being returned to pool HOT 1
- Links in Others are 404
- Select many with sort block fails HOT 1
- Remove ConfigurationOf* HOT 1
- The links in README are not working HOT 2
- MongoClient instances are not GCd HOT 2
- Pharo 12: Update WeakRegistry references
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voyage.