diff --git a/.github/workflows/RavenClient.yml b/.github/workflows/RavenClient.yml index 892a718c..4ed405c3 100644 --- a/.github/workflows/RavenClient.yml +++ b/.github/workflows/RavenClient.yml @@ -7,6 +7,12 @@ on: branches: [ v6.0 ] pull_request: branches: [ v6.0 ] + workflow_dispatch: + inputs: + ravendb_version: + description: 'RavenDB Version' + required: true + type: string jobs: build: @@ -34,9 +40,14 @@ jobs: with: java-version: ${{ matrix.java-version }} distribution: "zulu" - + - name: Download RavenDB Server - run: wget -O RavenDB.tar.bz2 "https://hibernatingrhinos.com/downloads/RavenDB%20for%20Linux%20x64/latest?buildType=${{ env.RAVENDB_BUILD_TYPE }}&version=${{ matrix.serverVersion }}" + run: | + if [[ -n "${{ inputs.ravendb_version }}" ]]; then + wget -O RavenDB.tar.bz2 "https://daily-builds.s3.amazonaws.com/RavenDB-${{ inputs.ravendb_version }}-linux-x64.tar.bz2" + else + wget -O RavenDB.tar.bz2 "https://hibernatingrhinos.com/downloads/RavenDB%20for%20Linux%20x64/latest?buildType=${{ env.RAVENDB_BUILD_TYPE }}&version=${{ matrix.serverVersion }}" + fi - run: mkdir certs - run: openssl genrsa -traditional -out certs/ca.key 2048 diff --git a/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java b/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java index cf14347e..4494f56e 100644 --- a/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java +++ b/src/test/java/net/ravendb/client/test/server/replication/PullReplicationTest.java @@ -171,7 +171,7 @@ public void updatePullReplicationOnSink() throws Exception { String definitionName1 = "pull-replication " + hub.getDatabase(); String definitionName2 = "pull-replication " + hub2.getDatabase(); - int timeout = 3_000; + int timeout = 15_000; hub.maintenance().forDatabase(hub.getDatabase()).send(new PutPullReplicationAsHubOperation(definitionName1)); hub2.maintenance().forDatabase(hub2.getDatabase()).send(new PutPullReplicationAsHubOperation(definitionName2)); @@ -185,6 +185,7 @@ public void updatePullReplicationOnSink() throws Exception { waitForDocumentToReplicate(sink, User.class,"hub1/1", timeout); PullReplicationAsSink pull = new PullReplicationAsSink(hub2.getDatabase(), "ConnectionString2-" + sink.getDatabase(), definitionName2); + pull.setUrl(sink.getUrls()[0]); pull.setTaskId(pullTasks.get(0).getTaskId()); addWatcherToReplicationTopology(sink, pull, hub2.getUrls()); @@ -261,7 +262,7 @@ public void disablePullReplicationOnSink() throws Exception { try (DocumentStore sink = getDocumentStore()) { try (DocumentStore hub = getDocumentStore()) { String definitionName = "pull-replication " + hub.getDatabase(); - int timeout = 8_000; + int timeout = 15_000; hub.maintenance().forDatabase(hub.getDatabase()) .send(new PutPullReplicationAsHubOperation(definitionName)); @@ -277,21 +278,26 @@ public void disablePullReplicationOnSink() throws Exception { PullReplicationAsSink pull = new PullReplicationAsSink(hub.getDatabase(), "ConnectionString-" + sink.getDatabase(), definitionName); pull.setDisabled(true); + pull.setUrl(sink.getUrls()[0]); pull.setTaskId(pullTasks.get(0).getTaskId()); addWatcherToReplicationTopology(sink, pull, hub.getUrls()); + Thread.sleep(500); // wait a bit to process updates + try (IDocumentSession main = hub.openSession()) { main.store(new User(), "hub/2"); main.saveChanges(); } - assertThat(waitForDocumentToReplicate(sink, User.class, "hub/2", timeout)) + assertThat(waitForDocumentToReplicate(sink, User.class, "hub/2", timeout / 3)) .isNull(); pull.setDisabled(false); addWatcherToReplicationTopology(sink, pull, hub.getUrls()); + Thread.sleep(500); // wait a bit to process updates + try (IDocumentSession main = hub.openSession()) { main.store(new User(), "hub/3"); main.saveChanges(); @@ -382,6 +388,7 @@ public List setupPullReplication(String remoteName, Doc for (DocumentStore store : hub) { PullReplicationAsSink pull = new PullReplicationAsSink(store.getDatabase(), "ConnectionString-" + store.getDatabase(), remoteName); + pull.setUrl(sink.getUrls()[0]); modifyReplicationDestination(pull); resList.add(addWatcherToReplicationTopology(sink, pull, store.getUrls())); }