Skip to content

Commit

Permalink
Adjust InsertBuilderSpec to do a single pull of data
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinlfer committed Jun 2, 2023
1 parent 533e46a commit 0df5b4d
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ class InsertBuilderSpec(global: GlobalRead) extends IOSuite with ResourceSuite w
.query[WriteTimeNameResult]

for {
_ <- executor.executeMutation(InsertBuilderSpecPerson.insert(person).usingTimestamp(timestamp.toLong).build)
find <- executor
.execute(query)
.compile
.toList
.map(_.headOption)
_ <- executor.executeMutation(InsertBuilderSpecPerson.truncate)
} yield expect.all(find.map(_.result == timestamp).getOrElse(false))

_ <- executor.executeMutation(InsertBuilderSpecPerson.insert(person).usingTimestamp(timestamp.toLong).build)
actual <- executor.execute(query).take(1).compile.lastOrError
_ <- executor.executeMutation(InsertBuilderSpecPerson.truncate)
} yield expect.all(actual.result == timestamp)
}
}
}

0 comments on commit 0df5b4d

Please sign in to comment.