Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
Change-Id: Ic7027670c7bffdffa569218bb771218c5a689f54
  • Loading branch information
igorbernstein2 committed Dec 11, 2023
1 parent 74c43ef commit 39bb429
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.threeten.bp.Duration;

@RunWith(JUnit4.class)
public class ReadIT {
Expand Down Expand Up @@ -322,7 +323,7 @@ public void reversed() {
}

@Test
public void reversedWithFocedResumption() throws IOException, InterruptedException {
public void reversedWithForcedResumption() throws IOException, InterruptedException {
assume()
.withMessage("reverse scans are not supported in the emulator")
.that(testEnvRule.env())
Expand Down Expand Up @@ -363,6 +364,10 @@ public void reversedWithFocedResumption() throws IOException, InterruptedExcepti
BigtableDataSettings.Builder settingsBuilder =
testEnvRule.env().getDataClientSettings().toBuilder();

settingsBuilder.stubSettings().readRowsSettings().retrySettings()
.setInitialRpcTimeout(Duration.ofMillis(10))
.setMaxAttempts(100);

InstantiatingGrpcChannelProvider.Builder transport =
((InstantiatingGrpcChannelProvider)
settingsBuilder.stubSettings().getTransportChannelProvider())
Expand Down Expand Up @@ -398,9 +403,9 @@ public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
for (Row row :
patchedClient.readRows(Query.create(tableId).prefix(uniqueKey).reversed(true))) {
actualResults.add(row);
Thread.sleep(1);
}
assertThat(actualResults).containsExactlyElementsIn(expectedResults).inOrder();
Thread.sleep(10);
}
}
}
Expand Down

0 comments on commit 39bb429

Please sign in to comment.