Skip to content

Commit

Permalink
best effort cleanup (#5528)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Nov 22, 2024
1 parent 5af9b53 commit b01195d
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 b01195d

Please sign in to comment.