Skip to content

Commit

Permalink
test indexesTestCustRoles
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Jan 17, 2024
1 parent 5691dc7 commit c2a1a9a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public void indexesTestCustRoles() {
new Document("v", indexVer)
.append("key", new Document("expires", 1))
.append("name", "expires_1")
.append("expireAfterSeconds", 0)
.append("expireAfterSeconds", 0L)
)));
}

Expand Down Expand Up @@ -401,6 +401,9 @@ public void indexesTestUsers() {
public void updateIndexes(final String name, final Set<Document> indexes) {
for (Document index: db.getCollection(name).listIndexes()) {
index.remove("ns");
if (index.containsKey("expireAfterSeconds")) {
index.put("expireAfterSeconds", Long.valueOf(index.get("expireAfterSeconds").toString()));
}
indexes.add(index);
}
}
Expand Down

0 comments on commit c2a1a9a

Please sign in to comment.