File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
integration/src/test/scala/com/spotify/scio/bigquery Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -126,23 +126,12 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll {
126
126
Try (bq.tables.delete(avroTable.ref))
127
127
}
128
128
129
- def waitForTable (table : Table .Spec ): Unit = {
130
- var retries = 0
131
- while (! bq.tables.exists(table.ref) && retries < 3 ) {
132
- Thread .sleep(500 )
133
- retries += 1
134
- }
135
- if (retries >= 3 ) throw new RuntimeException (s " Table $table not found " )
136
- }
137
-
138
129
" TypedBigQuery" should " handle records as TableRow" in {
139
130
runWithRealContext(options) { sc =>
140
131
sc.parallelize(records)
141
132
.saveAsTypedBigQueryTable(typedTable, createDisposition = CREATE_IF_NEEDED )
142
133
}.waitUntilFinish()
143
134
144
- waitForTable(typedTable)
145
-
146
135
runWithRealContext(options) { sc =>
147
136
val data = sc.typedBigQuery[Record ](typedTable)
148
137
data should containInAnyOrder(records)
@@ -160,8 +149,6 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll {
160
149
)
161
150
}.waitUntilFinish()
162
151
163
- waitForTable(tableRowTable)
164
-
165
152
runWithRealContext(options) { sc =>
166
153
val data = sc.bigQueryTable(tableRowTable).map(Record .fromTableRow)
167
154
data should containInAnyOrder(records)
@@ -181,8 +168,6 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll {
181
168
)
182
169
}.waitUntilFinish()
183
170
184
- waitForTable(avroTable)
185
-
186
171
runWithRealContext(options) { sc =>
187
172
val data =
188
173
sc.bigQueryTable(avroTable, Format .GenericRecordWithLogicalTypes ).map(Record .fromAvro)
You can’t perform that action at this time.
0 commit comments