Skip to content

Commit

Permalink
add timeout to test (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal authored Sep 25, 2024
1 parent ebbdf34 commit 74e9131
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import web5.sdk.crypto.keys.Jwk
import web5.sdk.dids.Service
import web5.sdk.dids.VerificationMethod
import web5.sdk.dids.ResolutionMetadataError
import java.util.concurrent.TimeUnit

class DidDhtTests {
@Nested
Expand Down Expand Up @@ -55,7 +56,10 @@ class DidDhtTests {
)
)

mockWebServer.takeRequest().apply {
val request = mockWebServer.takeRequest(60, TimeUnit.SECONDS)
assertNotNull(request, "Expected a request to be made to the MockWebServer")

request!!.apply {
assertEquals("/${bearerDid.did.uri.removePrefix("did:dht:")}", path)
assertEquals("PUT", method)
assertEquals("application/octet-stream", headers["Content-Type"])
Expand Down

0 comments on commit 74e9131

Please sign in to comment.