Skip to content

Commit

Permalink
Fixed #535: Kafka connector Neo4jSourceTaskTest.'should throw excepti…
Browse files Browse the repository at this point in the history
…on' is flaky (#579)
  • Loading branch information
mroiter-larus authored Aug 22, 2023
1 parent 6ab213e commit 7248f2c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,17 @@ class Neo4jSourceTaskTest {
val totalRecords = 10
insertRecords(totalRecords)

task.poll()
var exception: ConnectException? = null
Assert.assertEventually(ThrowingSupplier<Boolean, Exception> {
try {
task.poll()
false
} catch (e: ConnectException) {
exception = e
true
}
}, Matchers.equalTo(true), 30, TimeUnit.SECONDS)
if (exception != null) throw exception as ConnectException
}

@Test
Expand Down

0 comments on commit 7248f2c

Please sign in to comment.