-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from tinchodias/update_tests
Update tests
- Loading branch information
Showing
42 changed files
with
91 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
mc/Voyage-Model-Tests.package/VORepositoryTest.class/instance/testIsLazyOnToManyRelations.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
mc/Voyage-Model-Tests.package/VORepositoryTest.class/instance/testSaveWithClasses.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
tests | ||
testSaveWithClasses | ||
self repository save: (VOTestPilot new currency: VOTestEuro). | ||
self waitForWriteOperation. | ||
|
||
self assert: (self repository selectAll: VOTestPilot) first currency equals: VOTestEuro. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
mc/Voyage-Model-Tests.package/VORepositoryTest.class/instance/waitForWriteOperation.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
running | ||
waitForWriteOperation | ||
"Write operations can require some time to be applied by backend, and this template method can be overriden by subclasses to do something." | ||
|
||
"Do nothing by default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(name 'Voyage-Model-Tests-MartinDias.5' message 'Remove #testSelectAllJustAfterRemove, it does not show anything relevant, we know there are concurrency problems when no "write concerns" or equivalent is used to check that mongodb database finished a write operation.' id 'c31ddca0-5ae3-41a3-a97a-e5c74da0b275' date '5 September 2016' time '4:17:40.782815 pm' author 'MartinDias' ancestors ((name 'Voyage-Model-Tests-EstebanLorenzano.4' message 'using new descriptions for test' id 'e102d37d-d7d3-4845-917e-6bcd0d914010' date '3 August 2016' time '6:27:20.650685 pm' author 'EstebanLorenzano' ancestors ((name 'Voyage-Model-Tests-EstebanLorenzano.3' message 'model for test moved to generic package | ||
' id 'aea8069f-9aa9-5ef7-bc47-36932e3bf144' date '3 August 2016' time '6:19:41 pm' author 'EstebanLorenzano' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) | ||
(name 'Voyage-Model-Tests-MartinDias.6' message 'Adding VORepositoryTest>>waitForWriteOperation. Purpose: Write operations can require some time to be applied by backend, and this template method can be overriden by subclasses to do something. Do nothing by default.' id '66f21a79-5079-46ff-9625-d8726363e4cb' date '19 September 2016' time '9:22:27.214928 pm' author 'MartinDias' ancestors ((name 'Voyage-Model-Tests-MartinDias.5' message 'Remove #testSelectAllJustAfterRemove, it does not show anything relevant, we know there are concurrency problems when no "write concerns" or equivalent is used to check that mongodb database finished a write operation.' id 'c31ddca0-5ae3-41a3-a97a-e5c74da0b275' date '5 September 2016' time '4:17:40.782815 pm' author 'MartinDias' ancestors ((name 'Voyage-Model-Tests-EstebanLorenzano.4' message 'using new descriptions for test' id 'e102d37d-d7d3-4845-917e-6bcd0d914010' date '3 August 2016' time '6:27:20.650685 pm' author 'EstebanLorenzano' ancestors ((name 'Voyage-Model-Tests-EstebanLorenzano.3' message 'model for test moved to generic package | ||
' id 'aea8069f-9aa9-5ef7-bc47-36932e3bf144' date '3 August 2016' time '6:19:41 pm' author 'EstebanLorenzano' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) |
3 changes: 0 additions & 3 deletions
3
...-Tests.package/VOMongoReplicationDiscoverPrimaryScenarioTest.class/instance/repository.st
This file was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
...imaryScenarioTest.class/instance/setUp.st → ...rioTest.class/instance/setUpRepository.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
running | ||
setUp | ||
super setUp. | ||
|
||
setUpRepository | ||
"Note that `mongo B` is a secondary member, then the repository must figure out this fact, and discover the primary member in the replica set." | ||
repository := MongoReplicationTestResources newRepositoryOnB. | ||
|
||
repository := MongoReplicationTestResources newRepositoryOnB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...e-Mongo-Tests.package/VOMongoReplicationSimplestScenarioTest.class/instance/repository.st
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
mc/Voyage-Mongo-Tests.package/VOMongoReplicationSimplestScenarioTest.class/instance/setUp.st
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...go-Tests.package/VOMongoReplicationSimplestScenarioTest.class/instance/setUpRepository.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
running | ||
setUpRepository | ||
"Simplest scenario: Specify primary member in the replica set." | ||
|
||
repository := MongoReplicationTestResources newRepositoryOnA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions
3
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/class/resources.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/instance/repository.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
accessing | ||
repository | ||
^ VOMongoTestResource current repository | ||
^ repository |
4 changes: 4 additions & 0 deletions
4
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/instance/setUp.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
running | ||
setUp | ||
super setUp. | ||
self setUpRepository. |
8 changes: 8 additions & 0 deletions
8
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/instance/setUpRepository.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
running | ||
setUpRepository | ||
"Hook: subclasses can override with special ways of building the test repository" | ||
|
||
repository := VOMongoRepository | ||
host: self class mongoHost | ||
database: 'Voyage-Tests'. | ||
repository debug: true. |
15 changes: 8 additions & 7 deletions
15
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/instance/tearDown.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
running | ||
tearDown | ||
"Reset the DB after each test" | ||
"self repository dropDatabase --> this works but it's slow and... leaks open Sockets!" | ||
"self repository dropDatabase" | ||
|
||
self repository | ||
removeAll: VOTestOwner; | ||
removeAll: VOTestPet; | ||
removeAll: VOTestPilot; | ||
flush. | ||
super tearDown. | ||
|
||
(VOTestObject allSubclasses | ||
collect: [ :each | each persistentClass ] as: Set) | ||
do: [ :each | repository removeAll: each ]. | ||
|
||
Smalltalk garbageCollect. | ||
|
||
800 milliseconds asDelay wait. "Wait to reduce the probability of a concurrency conflict" | ||
self waitForWriteOperation. |
5 changes: 5 additions & 0 deletions
5
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/instance/waitForWriteOperation.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
running | ||
waitForWriteOperation | ||
"Write operations can be performed in a fire-and-forget mode, and it's convenient to wait a bit to ensure mongodb performed it before asserting on the results." | ||
|
||
50 milliSeconds wait |
10 changes: 7 additions & 3 deletions
10
mc/Voyage-Mongo-Tests.package/VOMongoTest.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{ | ||
"class" : { | ||
"resources" : "FrancoisStephany 8/8/2012 15:03" }, | ||
"mongoHost" : "MartinDias 9/19/2016 19:33", | ||
"mongoHost:" : "MartinDias 9/19/2016 19:34" }, | ||
"instance" : { | ||
"repository" : "EstebanLorenzano 4/21/2015 16:43", | ||
"tearDown" : "MartinDias 5/16/2016 00:40" } } | ||
"repository" : "MartinDias 9/19/2016 19:26", | ||
"setUp" : "MartinDias 9/19/2016 20:05", | ||
"setUpRepository" : "MartinDias 9/19/2016 20:06", | ||
"tearDown" : "MartinDias 9/19/2016 19:32", | ||
"waitForWriteOperation" : "MartinDias 9/21/2016 16:04" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/README.md
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/instance/repository.st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/instance/setUp.st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/instance/tearDown.st
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/methodProperties.json
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
mc/Voyage-Mongo-Tests.package/VOMongoTestResource.class/properties.json
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.