- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for FakeDns (0.1 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt
/** Sets the results for `hostname`. */ operator fun set( hostname: String, addresses: List<InetAddress>, ): FakeDns { hostAddresses[hostname] = addresses return this } /** Clears the results for `hostname`. */ fun clear(hostname: String): FakeDns { hostAddresses.remove(hostname) return this } @Throws(UnknownHostException::class) fun lookup( hostname: String,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/test/java/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) } @AfterEach
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/test/java/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() val call =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.6K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
return nil } // fakeNs is a mock struct for testing type fakeNs struct { closed *atomic.Bool fd uintptr inode uint64 } func newFakeNs(fd uintptr) *fakeNs { // the fake inode is the fd! magic. return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)} } func newFakeNsInode(fd uintptr, inode uint64) *fakeNs { return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode} }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jun 28 23:33:46 UTC 2024 - 3.9K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver_test.go
} sendAck(ztunClient) ztunClient.Close() // this will retry for a bit, so shouldn't flake mt.Assert(ztunnelConnected.Name(), nil, monitortest.Exactly(0)) } func podAndNetns() (*v1.Pod, *fakeNs) { devNull, err := os.Open(os.DevNull) if err != nil { panic(err) } // we can't close this now, because we need to pass it from the ztunnel server to the client
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 8.6K bytes - Viewed (0)