Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoferrer committed Aug 22, 2019
1 parent 19c0ce4 commit 70c20ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -452,7 +452,7 @@ class ServerCallBidiStreamingTests {

val respChannel = deferredRespChannel.await()
assert(respChannel.isClosedForSend){ "Abandoned response channel should be closed" }
verify(exactly = 1) { responseObserver.onError(matchStatus(Status.CANCELLED, "CANCELLED: test")) }
verify(exactly = 1) { responseObserver.onError(matchStatus(Status.CANCELLED)) }
coVerify(exactly = 0) { respChannel.send(any()) }
assert(serverCtx[Job]!!.isCompleted){ "Server job should be completed" }
assert(serverCtx[Job]!!.isCancelled){ "Server job should be cancelled" }
Expand Down
Expand Up @@ -160,6 +160,7 @@ class ServerCallUnaryTests {
verify(exactly = 1) {
responseObserver.onError(matchStatus(Status.CANCELLED))
}
runBlocking { serverSpy.job?.join() }
assertEquals("Job was cancelled",serverSpy.error?.message)
}

Expand Down

0 comments on commit 70c20ce

Please sign in to comment.