Skip to content

Commit 52d77f2

Browse files
committed
Tests updated
1 parent 24815fc commit 52d77f2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/test/scala/com/sfxcode/nosql/mongo/database/MongoConfigSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MongoConfigSpec extends Specification {
1212
val config = MongoConfig("config_test")
1313
config.database must beEqualTo("config_test")
1414
val shortDescription =
15-
"{hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}"
15+
"{hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}"
1616
config.clientSettings.getClusterSettings.getShortDescription must be equalTo shortDescription
1717
config.clientSettings.getApplicationName must be equalTo "simple-mongo-app"
1818
config.clientSettings.getClusterSettings.getHosts.size() must be equalTo 1
@@ -27,7 +27,7 @@ class MongoConfigSpec extends Specification {
2727

2828
config.database must beEqualTo("config_test")
2929
val shortDescription =
30-
"{hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}"
30+
"{hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}"
3131
config.clientSettings.getClusterSettings.getShortDescription must be equalTo shortDescription
3232
config.clientSettings.getApplicationName must be equalTo "Awesome Application Name"
3333
config.clientSettings.getClusterSettings.getHosts.size() must be equalTo 1
@@ -39,7 +39,7 @@ class MongoConfigSpec extends Specification {
3939
val config = MongoConfig.fromPath("config.test.mongo")
4040
config.database must beEqualTo("config_path_test")
4141
val shortDescription =
42-
"{hosts=[localhost:270007], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}"
42+
"{hosts=[localhost:270007], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}"
4343
config.clientSettings.getClusterSettings.getShortDescription must be equalTo shortDescription
4444
config.clientSettings.getApplicationName must be equalTo "simple-mongo-config-test"
4545
config.clientSettings.getClusterSettings.getHosts.size() must be equalTo 1
@@ -53,7 +53,7 @@ class MongoConfigSpec extends Specification {
5353
val config = MongoConfig.fromPath("config.test.auth.mongo")
5454
config.database must beEqualTo("config_path_test")
5555
val shortDescription =
56-
"{hosts=[localhost:270007], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}"
56+
"{hosts=[localhost:270007], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}"
5757
config.clientSettings.getClusterSettings.getShortDescription must be equalTo shortDescription
5858
config.clientSettings.getApplicationName must be equalTo "simple-mongo-config-test-with-auth"
5959
config.clientSettings.getClusterSettings.getHosts.size() must be equalTo 1

src/test/scala/com/sfxcode/nosql/mongo/operation/BaseSpec.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,19 @@ class BaseSpec extends Specification with BeforeAll {
4444

4545
"must create / drop indexes for key" in {
4646

47-
val createIndexResult: String = PersonDAO.createIndexForField("name")
47+
var createIndexResult: String = PersonDAO.createIndexForField("name")
4848

4949
createIndexResult must be equalTo "name_1"
5050

5151
PersonDAO.createIndexForField("name").headResult() must be equalTo "name_1"
5252

5353
val dropIndexResult: Void = PersonDAO.dropIndexForName("name_1")
5454

55-
dropIndexResult.toString() must not beEmpty
55+
createIndexResult = PersonDAO.createIndexForField("name")
56+
57+
createIndexResult must be equalTo "name_1"
58+
59+
5660

5761
}
5862

0 commit comments

Comments
 (0)