Skip to content

Commit

Permalink
fix compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Feb 17, 2024
1 parent d4a4238 commit bdb88ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/us/kbase/workspace/kbase/InitWorkspaceServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.mongodb.ServerAddress;
import com.mongodb.MongoClientSettings;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoDatabase;

import us.kbase.abstracthandle.AbstractHandleClient;
Expand Down Expand Up @@ -414,7 +415,7 @@ public static MongoClient buildMongo(final KBaseWorkspaceConfig c, final String
final MongoClientSettings.Builder mongoBuilder = MongoClientSettings.builder()
.retryWrites(c.getMongoRetryWrites())
.applyToClusterSettings(builder -> builder.hosts(
Arrays.asList(new ServerAddress(c.getMongoHost()))));
Arrays.asList(new ServerAddress(c.getHost()))));
try {
if (c.getMongoUser() != null) {
final MongoCredential creds = MongoCredential.createCredential(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void setUpClass() throws Exception {
System.out.println("Started mongo server at localhost:" + mongoCon.getServerPort());

@SuppressWarnings("resource")
MongoClient mongoClient = MongoClients.create("mongodb://localhost:" + mongo.getServerPort());
MongoClient mongoClient = MongoClients.create("mongodb://localhost:" + mongoCon.getServerPort());
mongo = mongoClient.getDatabase("MinioBackendTest");

minio = new MinioController(
Expand Down

0 comments on commit bdb88ed

Please sign in to comment.