Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Ashcraft committed Oct 31, 2024
1 parent 6ee2e01 commit d9dd509
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,31 +240,6 @@ public void testRead() {
PAssert.thatSingleton(rows.apply("Count All", Count.globally()))
.isEqualTo((long) EXPECTED_ROW_COUNT);

expectedLogs.verifyInfo("Autocommit has been disabled");

Iterable<TestRow> expectedValues = TestRow.getExpectedValues(0, EXPECTED_ROW_COUNT);
PAssert.that(rows).containsInAnyOrder(expectedValues);

pipeline.run();
}

@Test
public void testReadDisableAutoCommitFalse() {
PCollection<TestRow> rows =
pipeline.apply(
JdbcIO.<TestRow>read()
.withFetchSize(12)
.withDisableAutoCommit(false)
.withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
.withQuery("select name,id from " + READ_TABLE_NAME)
.withRowMapper(new JdbcTestHelper.CreateTestRowOfNameAndId())
.withCoder(SerializableCoder.of(TestRow.class)));

PAssert.thatSingleton(rows.apply("Count All", Count.globally()))
.isEqualTo((long) EXPECTED_ROW_COUNT);

expectedLogs.verifyNotLogged("Autocommit has been disabled");

Iterable<TestRow> expectedValues = TestRow.getExpectedValues(0, EXPECTED_ROW_COUNT);
PAssert.that(rows).containsInAnyOrder(expectedValues);

Expand Down

0 comments on commit d9dd509

Please sign in to comment.