diff --git a/src/us/kbase/test/auth2/lib/storage/mongo/MongoStorageStartUpTest.java b/src/us/kbase/test/auth2/lib/storage/mongo/MongoStorageStartUpTest.java index 719f7491..9f8a8da2 100644 --- a/src/us/kbase/test/auth2/lib/storage/mongo/MongoStorageStartUpTest.java +++ b/src/us/kbase/test/auth2/lib/storage/mongo/MongoStorageStartUpTest.java @@ -169,9 +169,10 @@ public void indexesConfig() { @Test public void indexesConfigApp() { final Set indexes = new HashSet<>(); - db.getCollection("config_app").listIndexes().forEach((Consumer) indexes::add); +// db.getCollection("config_app").listIndexes().forEach((Consumer) indexes::add); // indexes.forEach(doc -> doc.remove("ns")); // indexes.forEach(this::updateInt2Long); + updateIndexes("config_app", indexes); display(indexes); final Set expected = set( // new Document("v", indexVer) @@ -418,6 +419,13 @@ public void indexesTestUsers() { ))); } + public void updateIndexes(final String name, final Set indexes) { + for (Document index: db.getCollection(name).listIndexes()) { + index.remove("ns"); + indexes.add(index); + } + } + public void updateInt2Long(final Document doc) { for (Map.Entry entry : doc.entrySet()) { String key = entry.getKey();