Skip to content

Commit

Permalink
update test.yml, build.xml, and WorkspaceMongoIndex.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Feb 22, 2024
1 parent 640953d commit 11521dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
matrix:
include:
- java: '11'
mongo: 'mongodb-linux-x86_64-3.6.23'
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'true'
ant_test: 'test_quick_coverage'
Expand All @@ -56,12 +56,6 @@ jobs:
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
ant_test: 'test_quick_coverage'
# Mongo7 setup
- java: '11'
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
ant_test: 'test_quick_coverage'
steps:
- uses: actions/checkout@v3

Expand Down
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@
<include name="apache_commons/commons-collections-3.2.1.jar"/>
<include name="jsemver/java-semver-0.9.0.jar"/>
<include name="equalsverifier/equalsverifier-3.1.10.jar"/>
<include name="kbase/auth2/kbase-auth2-test-fat-0.6.1.jar"/>
<include name="arangodb/arangodb-java-driver-6.7.2.jar"/>
<include name="arangodb/velocypack-2.4.0.jar"/>
<!-- mockito and dependencies -->
<include name="mockito/mockito-core-3.0.0.jar"/>
<include name="bytebuddy/byte-buddy-1.9.10.jar"/>
<include name="bytebuddy/byte-buddy-agent-1.9.10.jar"/>
<include name="objenesis/objenesis-2.6.jar"/>
<!-- put auth2 fat jar in the last entry so that it would not shadow other jars-->
<include name="kbase/auth2/kbase-auth2-test-fat-0.6.1.jar"/>
</fileset>

<union id="applicationjars">
Expand Down
4 changes: 2 additions & 2 deletions src/us/kbase/workspace/test/WorkspaceMongoIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class WorkspaceMongoIndex {

public static Set<Document> getAndNormalizeIndexes(final MongoDatabase db, final String collectionName) {
final Set<Document> indexes = new HashSet<>();
for (Document index: db.getCollection(collectionName).listIndexes()) {
// In MongoDB 4.4, the listIndexes and the mongo shell helper method db.collection.getAndNormalizeIndexes()
for (final Document index: db.getCollection(collectionName).listIndexes()) {
// In MongoDB 4.4, the listIndexes and the mongo shell helper method db.collection.getIndexes()
// no longer returns the namespace ns field in the index specification documents.
index.remove("ns");
// some versions of Mongo return ints, some longs. Convert all to longs.
Expand Down

0 comments on commit 11521dc

Please sign in to comment.