markusthoemmes commented on a change in pull request #2600: Remove databases of 
old ReplicatorTests that failed
URL: 
https://github.com/apache/incubator-openwhisk/pull/2600#discussion_r132454181
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/database/test/ReplicatorTests.scala
 ##########
 @@ -130,6 +130,17 @@ class ReplicatorTests extends FlatSpec
         }
     }
 
+    // Do cleanups of possibly existing databases
+    val dbs = replicatorClient.dbs().futureValue
+    dbs shouldBe 'right
+    dbs.right.get.filter(dbname => dbname.contains(testDbPrefix)).map(dbName 
=> removeDatabase(dbName))
+
+    val docs = replicatorClient.getAllDocs().futureValue
+    docs shouldBe 'right
+    docs.right.get.fields("rows").convertTo[List[JsObject]]
+        .filter(_.fields("id").convertTo[String].contains(testDbPrefix))
 
 Review comment:
   Should that be `startsWith(testDbPrefix)` for good measure? Might need to do 
`startsWith("backup_" + testDbProfix) || startsWith("continuous_" + 
testDbPrefix)`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to