Skip to content
Merged
Show file tree
Hide file tree
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 @@ -169,7 +169,7 @@ private void assertInsertedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManager.getRowCount("child21") == 1);
assertThatResult(result).meetsConditions();
// child21 is the last row to be inserted. Hence by this time all other records must be updated
Expand Down Expand Up @@ -247,7 +247,7 @@ private void assertUpdatedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManager.getRowCount("child11") == 2);
assertThatResult(result).meetsConditions();
// we added one extra child row in spanner. Hence by this time all other records must be updated
Expand Down Expand Up @@ -285,7 +285,7 @@ private void assertDeletedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManager.getRowCount("parent2") == 0);
assertThatResult(result).meetsConditions();
// parent2 is the last row to be deleted. Hence by this time all other records must be deleted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private void assertInsertedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardB.getRowCount("child21") == 1);
assertThatResult(result).meetsConditions();
// child21 is the last row to be inserted. Hence by this time all other records must be updated
Expand Down Expand Up @@ -283,7 +283,7 @@ private void assertUpdatedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardA.getRowCount("child11") == 2);
assertThatResult(result).meetsConditions();
// we added one extra child row in spanner. Hence by this time all other records must be updated
Expand Down Expand Up @@ -322,7 +322,7 @@ private void assertDeletedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(writerJobInfo, Duration.ofMinutes(10)),
createConfig(writerJobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardB.getRowCount("parent2") == 0);
assertThatResult(result).meetsConditions();
// parent2 is the last row to be deleted. Hence by this time all other records must be deleted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import org.apache.beam.it.jdbc.MySQLResourceManager;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -58,7 +57,6 @@
@Category({TemplateIntegrationTest.class, SkipDirectRunnerTest.class})
@TemplateIntegrationTest(SpannerToSourceDb.class)
@RunWith(JUnit4.class)
@Ignore("This test is disabled because of timeout issue to unblock release")
public class SpannerToSourceDbInterleaveMultiShardIT extends SpannerToSourceDbITBase {
private static final Logger LOG =
LoggerFactory.getLogger(SpannerToSourceDbInterleaveMultiShardIT.class);
Expand Down Expand Up @@ -213,28 +211,28 @@ private void assertInsertedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result parent1Result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardA.getRowCount("parent1") == 1);
assertThatResult(parent1Result).meetsConditions();

PipelineOperator.Result child1Result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardA.getRowCount("child11") == 1);
assertThatResult(child1Result).meetsConditions();

PipelineOperator.Result parent2Result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardB.getRowCount("parent2") == 1);
assertThatResult(parent2Result).meetsConditions();

PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardB.getRowCount("child21") == 1);
assertThatResult(result).meetsConditions();

Expand Down Expand Up @@ -297,7 +295,7 @@ private void assertUpdatedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardA.getRowCount("child11") == 2);
assertThatResult(result).meetsConditions();

Expand Down Expand Up @@ -334,14 +332,14 @@ private void assertDeletedRowsInMySQL() throws InterruptedException {
PipelineOperator.Result result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardB.getRowCount("parent2") == 0);
assertThatResult(result).meetsConditions();

PipelineOperator.Result parent1Result =
pipelineOperator()
.waitForCondition(
createConfig(jobInfo, Duration.ofMinutes(10)),
createConfig(jobInfo, Duration.ofMinutes(30)),
() -> jdbcResourceManagerShardA.getRowCount("parent1") == 0);
assertThatResult(parent1Result).meetsConditions();
PipelineOperator.Result child1Result =
Expand Down
Loading