Skip to content

Commit

Permalink
Merge pull request #1822 from akto-api-security/modify_write_db_config
Browse files Browse the repository at this point in the history
specify write concern in testing module dao init
  • Loading branch information
ayushaga14 authored Dec 13, 2024
2 parents e0a94a3 + 91f9b61 commit 97e104c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/testing/src/main/java/com/akto/testing/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import com.akto.util.enums.GlobalEnums.Severity;
import com.mongodb.BasicDBObject;
import com.mongodb.ConnectionString;
import com.mongodb.ReadPreference;
import com.mongodb.WriteConcern;
import com.mongodb.client.model.*;
import com.mongodb.client.result.DeleteResult;

Expand Down Expand Up @@ -219,7 +221,9 @@ private static void setTestingRunConfig(TestingRun testingRun, TestingRunResultS

public static void main(String[] args) throws InterruptedException {
String mongoURI = System.getenv("AKTO_MONGO_CONN");
DaoInit.init(new ConnectionString(mongoURI));
ReadPreference readPreference = ReadPreference.secondary();
WriteConcern writeConcern = WriteConcern.W1;
DaoInit.init(new ConnectionString(mongoURI), readPreference, writeConcern);

boolean connectedToMongo = false;
do {
Expand Down

0 comments on commit 97e104c

Please sign in to comment.