Skip to content

Commit

Permalink
Merge pull request #104 from ml054/v6.0
Browse files Browse the repository at this point in the history
Merge V5.4 -> V6.0
  • Loading branch information
ml054 authored Aug 27, 2024
2 parents 4a38dd9 + f6d2dd1 commit fab9339
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/RavenClient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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());
Expand Down Expand Up @@ -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));
Expand All @@ -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();
Expand Down Expand Up @@ -382,6 +388,7 @@ public List<ModifyOngoingTaskResult> 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()));
}
Expand Down

0 comments on commit fab9339

Please sign in to comment.