Skip to content

Commit

Permalink
Set durability policy of keyspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
twthorn committed Sep 29, 2023
1 parent 3c9bd96 commit 924729d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/test/docker/local/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ mkdir -p "${VTDATAROOT}/tmp"

alias mysql="command mysql -h 127.0.0.1 -P 15306"
alias vtctlclient="command vtctlclient --server localhost:15999 --log_dir ${VTDATAROOT}/tmp --alsologtostderr"
alias vtctldclient="command vtctldclient --server localhost:15999 --log_dir ${VTDATAROOT}/tmp --alsologtostderr"

# Make sure aliases are expanded in non-interactive shell
shopt -s expand_aliases
2 changes: 2 additions & 0 deletions src/test/docker/local/scripts/vttablet-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ vttablet \
--vtctld_addr http://$hostname:$vtctld_web_port/ \
> $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 &

vtctldclient --grpc_auth_static_client_creds grpc_static_client_auth.json SetKeyspaceDurabilityPolicy --durability-policy=semi_sync $keyspace

# Block waiting for the tablet to be listening
# Not the same as healthy

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/debezium/connector/vitess/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private static String readStringFromFile(String ddlFile) throws IOException, URI
}

public static int waitTimeForRecords() {
return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "records.waittime", "80"));
return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "records.waittime", "60"));
}

public static Binlogdata.VEvent defaultFieldEvent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ protected boolean checkOnlineDdlCompleted(String keyspace, String id) {
List<String> args = Arrays.asList("OnlineDDL", keyspace, "show", id);
List<String> results = execVtctl(args, vtctldHost, vtctldPort);
AtomicBoolean isCompleted = new AtomicBoolean(false);
LOGGER.info("Results: {}", results);
results.forEach(s -> {
if (s.trim().equals("complete")) {
isCompleted.set(true);
Expand Down

0 comments on commit 924729d

Please sign in to comment.