diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9fa49f0ba..9e72923d9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -27,4 +27,4 @@ jobs: cache: 'maven' github-token: ${{ secrets.GITHUB_TOKEN }} - name: Build with Maven - run: mvn -batch-mode clean install -Ppre --file pom.xml + run: mvn -batch-mode clean install -rf model -Ppre --file pom.xml diff --git a/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java b/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java index 467a6dc0a..bbf8e7c3a 100644 --- a/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java +++ b/isolates/src/test/java/com/salesforce/apollo/demesnes/FireFliesTrace.java @@ -202,7 +202,7 @@ public void before() throws Exception { var localRouter = new LocalServer(prefix, member).router(ServerConnectionCache.newBuilder().setTarget(30)); var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1), checkpointDirBase, Duration.ofMillis(10), 0.00125, - Duration.ofMinutes(1), 10); + Duration.ofMinutes(1), 3, 10, 0.1); var node = new ProcessContainerDomain(group, member, pdParams, params, RuntimeParameters.newBuilder() .setFoundation( sealed) diff --git a/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java b/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java index 04164ccf4..3dee46cf6 100644 --- a/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java +++ b/model/src/main/java/com/salesforce/apollo/model/ProcessDomain.java @@ -52,7 +52,11 @@ public ProcessDomain(Digest group, ControlledIdentifierMember member, ProcessDom Builder builder, Parameters.RuntimeParameters.Builder runtime, InetSocketAddress endpoint, com.salesforce.apollo.fireflies.Parameters.Builder ff, StereotomyMetrics stereotomyMetrics) { super(member, builder, parameters.dbURL, parameters.checkpointBaseDir, runtime); - var base = Context.newBuilder().setId(group).build(); + var base = Context.newBuilder() + .setBias(parameters.dhtBias) + .setpByz(parameters.dhtPbyz) + .setId(group) + .build(); final var dhtUrl = String.format("jdbc:h2:mem:%s-%s;DB_CLOSE_DELAY=-1", member.getId(), ""); JdbcConnectionPool connectionPool = JdbcConnectionPool.create(dhtUrl, "", ""); connectionPool.setMaxConnections(10); @@ -120,7 +124,6 @@ protected void stopServices() { public record ProcessDomainParameters(String dbURL, Duration dhtOperationsTimeout, Path checkpointBaseDir, Duration dhtOpsFrequency, double dhtFpr, Duration dhtEventValidTO, - int jdbcMaxConnections) { - + int dhtBias, int jdbcMaxConnections, double dhtPbyz) { } } diff --git a/model/src/test/java/com/salesforce/apollo/model/ContainmentDomainTest.java b/model/src/test/java/com/salesforce/apollo/model/ContainmentDomainTest.java index 47acac2eb..5dd74b968 100644 --- a/model/src/test/java/com/salesforce/apollo/model/ContainmentDomainTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/ContainmentDomainTest.java @@ -87,7 +87,7 @@ public void before() throws Exception { routers.add(localRouter); var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1), checkpointDirBase, Duration.ofMillis(10), 0.00125, - Duration.ofMinutes(1), 10); + Duration.ofMinutes(1), 3, 10, 0.1); var domain = new ProcessContainerDomain(group, member, pdParams, params, RuntimeParameters.newBuilder() .setFoundation( sealed) diff --git a/model/src/test/java/com/salesforce/apollo/model/DomainTest.java b/model/src/test/java/com/salesforce/apollo/model/DomainTest.java index c597245b5..34b14fbdc 100644 --- a/model/src/test/java/com/salesforce/apollo/model/DomainTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/DomainTest.java @@ -217,7 +217,7 @@ public void before() throws Exception { routers.add(localRouter); var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1), checkpointDirBase, Duration.ofMillis(10), 0.00125, - Duration.ofMinutes(1), 10); + Duration.ofMinutes(1), 3, 10, 0.1); var domain = new ProcessDomain(group, member, pdParams, params, RuntimeParameters.newBuilder() .setFoundation(sealed) .setContext(context) diff --git a/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java b/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java index 116109039..caa51b54c 100644 --- a/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java +++ b/model/src/test/java/com/salesforce/apollo/model/FireFliesTest.java @@ -87,9 +87,9 @@ public void before() throws Exception { var context = new ContextImpl<>(DigestAlgorithm.DEFAULT.getLast(), CARDINALITY, 0.2, 3); final var member = new ControlledIdentifierMember(id); var localRouter = new LocalServer(prefix, member).router(ServerConnectionCache.newBuilder().setTarget(30)); - var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1), + var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofSeconds(5), checkpointDirBase, Duration.ofMillis(10), 0.00125, - Duration.ofMinutes(1), 10); + Duration.ofSeconds(5), 3, 10, 0.1); var node = new ProcessDomain(group, member, pdParams, params, RuntimeParameters.newBuilder() .setFoundation(sealed) .setContext(context) diff --git a/model/src/test/resources/logback-test.xml b/model/src/test/resources/logback-test.xml index 8d35dfd27..9141db2ba 100644 --- a/model/src/test/resources/logback-test.xml +++ b/model/src/test/resources/logback-test.xml @@ -57,7 +57,7 @@ - +