Skip to content

Commit

Permalink
Add transform names to help debug flaky test
Browse files Browse the repository at this point in the history
for issue #21702
  • Loading branch information
nielm committed Jun 8, 2022
1 parent a1c3d0c commit 272b853
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public void testWrite() throws Exception {
.withDatabaseId(databaseName));

PCollectionView<Dialect> dialectView =
p.apply(Create.of(Dialect.POSTGRESQL)).apply(View.asSingleton());
p.apply("PG Dialect", Create.of(Dialect.POSTGRESQL))
.apply("PG Dialect View", View.asSingleton());
p.apply("PG init", GenerateSequence.from(0).to(numRecords))
.apply("Generate PG mu", ParDo.of(new GenerateMutations(options.getTable())))
.apply(
Expand Down Expand Up @@ -224,7 +225,8 @@ public void testSequentialWrite() throws Exception {
.withDatabaseId(databaseName));

PCollectionView<Dialect> dialectView =
p.apply(Create.of(Dialect.POSTGRESQL)).apply(View.asSingleton());
p.apply("PG Dialect", Create.of(Dialect.POSTGRESQL))
.apply("PG Dialect View", View.asSingleton());

SpannerWriteResult pgStepOne =
p.apply("pg first step", GenerateSequence.from(0).to(numRecords))
Expand Down Expand Up @@ -269,7 +271,8 @@ public void testReportFailures() throws Exception {
.withFailureMode(SpannerIO.FailureMode.REPORT_FAILURES));

PCollectionView<Dialect> dialectView =
p.apply(Create.of(Dialect.POSTGRESQL)).apply(View.asSingleton());
p.apply("PG Dialect", Create.of(Dialect.POSTGRESQL))
.apply("PG Dialect View", View.asSingleton());
p.apply("pg init", GenerateSequence.from(0).to(2 * numRecords))
.apply("Generate pg mu", ParDo.of(new GenerateMutations(options.getTable(), new DivBy2())))
.apply(
Expand Down Expand Up @@ -312,7 +315,8 @@ public void testPgFailFast() throws Exception {
int numRecords = 100;

PCollectionView<Dialect> dialectView =
p.apply(Create.of(Dialect.POSTGRESQL)).apply(View.asSingleton());
p.apply("PG Dialect", Create.of(Dialect.POSTGRESQL))
.apply("PG Dialect View", View.asSingleton());
p.apply(GenerateSequence.from(0).to(2 * numRecords))
.apply(ParDo.of(new GenerateMutations(options.getTable(), new DivBy2())))
.apply(
Expand Down

0 comments on commit 272b853

Please sign in to comment.