Skip to content

Commit

Permalink
best effort cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Nov 21, 2024
1 parent f54ce9a commit 716820b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.joda.time.format.DateTimeFormat
import org.scalacheck._
import org.scalatest.BeforeAndAfterAll

import scala.util.Random
import scala.util.{Random, Try}

object TypedBigQueryIT {
@BigQueryType.toTable
Expand Down Expand Up @@ -118,9 +118,10 @@ class TypedBigQueryIT extends PipelineSpec with BeforeAndAfterAll {

override protected def afterAll(): Unit = {
val bq = BigQuery.defaultInstance()
bq.tables.delete(typedTable.ref)
bq.tables.delete(tableRowTable.ref)
bq.tables.delete(avroTable.ref)
// best effort cleanup
Try(bq.tables.delete(typedTable.ref))
Try(bq.tables.delete(tableRowTable.ref))
Try(bq.tables.delete(avroTable.ref))
}

"TypedBigQuery" should "handle records as TableRow" in {
Expand Down

0 comments on commit 716820b

Please sign in to comment.