Skip to content

test: unflake SavepointMockServerTest #3694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void clearRequests() {
mockSpanner.clearRequests();
}

@SuppressWarnings("ClassEscapesDefinedScope")
@Override
public ITConnection createConnection() {
return createConnection(
Expand Down Expand Up @@ -698,9 +699,10 @@ public void testKeepAlive() throws InterruptedException, TimeoutException {
connection.savepoint("s1");
connection.execute(INSERT_STATEMENT);
connection.rollbackToSavepoint("s1");
mockSpanner.waitForRequestsToContain(RollbackRequest.class, 1000L);
String keepAliveTagAfterRollback = "test_keep_alive_tag_after_rollback";
System.setProperty("spanner.connection.keep_alive_query_tag", keepAliveTagAfterRollback);
mockSpanner.waitForRequestsToContain(RollbackRequest.class, 1000L);
mockSpanner.clearRequests();

// Verify that we don't get any new keep-alive requests from this point.
Thread.sleep(2L);
Expand Down
Loading