diff --git a/integration/src/test/scala/com/spotify/scio/bigquery/TypedBigQueryIT.scala b/integration/src/test/scala/com/spotify/scio/bigquery/TypedBigQueryIT.scala index a7d15091b5..21e6c35380 100644 --- a/integration/src/test/scala/com/spotify/scio/bigquery/TypedBigQueryIT.scala +++ b/integration/src/test/scala/com/spotify/scio/bigquery/TypedBigQueryIT.scala @@ -126,23 +126,12 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll { Try(bq.tables.delete(avroTable.ref)) } - def waitForTable(table: Table.Spec): Unit = { - var retries = 0 - while (!bq.tables.exists(table.ref) && retries < 3) { - Thread.sleep(500) - retries += 1 - } - if (retries >= 3) throw new RuntimeException(s"Table $table not found") - } - "TypedBigQuery" should "handle records as TableRow" in { runWithRealContext(options) { sc => sc.parallelize(records) .saveAsTypedBigQueryTable(typedTable, createDisposition = CREATE_IF_NEEDED) }.waitUntilFinish() - waitForTable(typedTable) - runWithRealContext(options) { sc => val data = sc.typedBigQuery[Record](typedTable) data should containInAnyOrder(records) @@ -160,8 +149,6 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll { ) }.waitUntilFinish() - waitForTable(tableRowTable) - runWithRealContext(options) { sc => val data = sc.bigQueryTable(tableRowTable).map(Record.fromTableRow) data should containInAnyOrder(records) @@ -181,8 +168,6 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll { ) }.waitUntilFinish() - waitForTable(avroTable) - runWithRealContext(options) { sc => val data = sc.bigQueryTable(avroTable, Format.GenericRecordWithLogicalTypes).map(Record.fromAvro)