- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for FakeDns (0.03 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt
// Most tests from URLConnectionTest class JavaNetAuthenticatorTest { private var authenticator = JavaNetAuthenticator() private val fakeDns = FakeDns() private val recordingAuthenticator = RecordingAuthenticator() private val factory = TestValueFactory() .apply { dns = fakeDns } @BeforeEach fun setup() { Authenticator.setDefault(recordingAuthenticator) } @AfterEachCreated: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 2.7K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt
server.enqueue( MockResponse( code = 301, headers = headersOf("Location", "http://www.fakeurl:" + server.port), ), ) server.enqueue(MockResponse()) val dns = FakeDns() dns["fakeurl"] = client.dns.lookup(server.hostName) dns["www.fakeurl"] = client.dns.lookup(server.hostName) client = client .newBuilder() .dns(dns) .build()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 18:33:48 GMT 2025 - 9.7K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/RouteSelectorTest.kt
import java.net.Proxy import java.net.ProxySelector import java.net.SocketAddress import java.net.URI import java.net.UnknownHostException import kotlin.test.assertFailsWith import okhttp3.Address import okhttp3.FakeDns import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.Route import okhttp3.TestValueFactory import okhttp3.internal.connection.RouteSelector.Companion.socketHost
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Oct 08 03:50:05 GMT 2025 - 20.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
MockResponse .Builder() .code(301) .setHeader("Location", "http://www.fakeurl:" + server.port) .build(), ) server.enqueue(MockResponse()) val dns = FakeDns() dns["fakeurl"] = client.dns.lookup(server.hostName) dns["www.fakeurl"] = client.dns.lookup(server.hostName) client = client .newBuilder() .dns(dns) .build()Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 70.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
executeSynchronously("/") .assertCode(200) .assertBody("A") // Attempt conditional cache validation and a DNS miss. client = client .newBuilder() .dns(FakeDns()) .build() executeSynchronously("/").assertFailure(UnknownHostException::class.java) } @Test fun redirect() { server.enqueue( MockResponse( code = 301,
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 147.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
) } @Test fun invalidHost() { // Note that 1234.1.1.1 is an invalid host in a URI, but URL isn't as strict. client = client .newBuilder() .dns(FakeDns()) .build() assertFailsWith<UnknownHostException> { getResponse( Request .Builder() .url("http://1234.1.1.1/index.html".toHttpUrl()) .build(),
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Jun 21 20:36:35 GMT 2025 - 133.2K bytes - Click Count (0)