- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for assertFailureMatches (0.1 sec)
-
okhttp/src/test/java/okhttp3/RouteFailureTest.kt
client.newBuilder() .fastFallback(false) .apply { retryOnConnectionFailure = false } .build() executeSynchronously(request) .assertFailureMatches("stream was reset: REFUSED_STREAM") assertThat(client.routeDatabase.failedRoutes).isEmpty() assertThat(server1.requestCount).isEqualTo(1) assertThat(server2.requestCount).isEqualTo(0)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue May 14 17:48:07 UTC 2024 - 11.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordedResponse.kt
} fun assertFailure(vararg messages: String) = apply { assertThat(failure, "No failure found").isNotNull() assertThat(messages).contains(failure!!.message) } fun assertFailureMatches(vararg patterns: String) = apply { val message = failure!!.message!! assertThat( patterns.firstOrNull { pattern -> message.matches(pattern.toRegex()) },
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
executeSynchronously("/").assertBody("seed connection pool") // If this succeeds, too many requests were made. executeSynchronously("/") .assertFailure(IOException::class.java) .assertFailureMatches( "stream was reset: CANCEL", "unexpected end of stream on " + server.url("/").redact(), ) } @RetryingTest(5) @Flaky
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0)