Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for assumeNetwork (0.15 sec)

  1. okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt

        client =
          OkHttpClient.Builder()
            .cache(Cache(FakeFileSystem(), "/cache".toPath(), 10_000_000))
            .build()
      }
    
      @Test
      fun testRequestExternal() {
        assumeNetwork()
    
        val request = Request("https://www.google.com/robots.txt".toHttpUrl())
    
        val networkRequest =
          request.newBuilder()
            .build()
    
        val call = client.newCall(networkRequest)
    
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-04-10 19:46
    - 2.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConscryptTest.kt

      @Disabled
      fun testMozilla() {
        assumeNetwork()
    
        val request = Request.Builder().url("https://mozilla.org/robots.txt").build()
    
        client.newCall(request).execute().use {
          assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
          assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        }
      }
    
      @Test
      @Disabled
      fun testGoogle() {
        assumeNetwork()
    
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-08 01:13
    - 3.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CorrettoTest.kt

      @Disabled
      fun testMozilla() {
        assumeNetwork()
    
        val request = Request.Builder().url("https://mozilla.org/robots.txt").build()
    
        client.newCall(request).execute().use {
          assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
          assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        }
      }
    
      @Test
      @Disabled
      fun testGoogle() {
        assumeNetwork()
    
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-08 01:13
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/BouncyCastleTest.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import mockwebserver3.MockWebServer
    import okhttp3.TestUtil.assumeNetwork
    import okhttp3.testing.PlatformRule
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    class BouncyCastleTest {
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-08 01:13
    - 1.6K bytes
    - Viewed (0)
  5. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

      @Test
      fun testRequestWithSniRequirement() {
        assumeNetwork()
    
        val request = Request.Builder().url("https://docs.fabric.io/android/changelog.html").build()
    
        val response = client.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
        }
      }
    
      @Test
      fun testConscryptRequest() {
        assumeNetwork()
    
        try {
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-20 10:30
    - 27K bytes
    - Viewed (0)
  6. okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt

        val call = client.newCall(Request(serverRule.server.url("/")))
    
        call.execute().use { response ->
          assertThat(response.code).isEqualTo(200)
        }
      }
    
      @Test
      fun testRequestExternal() {
        assumeNetwork()
    
        val call = client.newCall(Request("https://google.com/robots.txt".toHttpUrl()))
    
        call.execute().use { response ->
          assertThat(response.code).isEqualTo(200)
        }
      }
    
      @Test
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-08 01:13
    - 5.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

    import assertk.assertions.isEqualTo
    import assertk.assertions.isInstanceOf
    import assertk.assertions.isNotNull
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.TestUtil.assumeNetwork
    import okhttp3.internal.connectionAccessor
    import okhttp3.internal.exchangeAccessor
    import okhttp3.internal.platform.OpenJSSEPlatform
    import okhttp3.testing.PlatformRule
    import okhttp3.tls.HandshakeCertificates
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-20 10:30
    - 3.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/JSSETest.kt

    import assertk.assertions.isNotEmpty
    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.TestUtil.assumeNetwork
    import okhttp3.internal.connection
    import okhttp3.testing.PlatformRule
    import okhttp3.testing.PlatformVersion
    import okio.ByteString.Companion.toByteString
    import org.junit.jupiter.api.Assertions.assertEquals
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-01-20 10:30
    - 5.4K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

       */
      @Throws(Exception::class)
      @JvmStatic
      fun awaitGarbageCollection() {
        Runtime.getRuntime().gc()
        Thread.sleep(100)
        System.runFinalization()
      }
    
      @JvmStatic
      fun assumeNetwork() {
        try {
          InetAddress.getByName("www.google.com")
        } catch (uhe: UnknownHostException) {
          assumeTrue(false, "requires network")
        }
      }
    
      @JvmStatic
      fun assumeNotWindows() {
    Registered: 2024-11-01 11:42
    - Last Modified: 2024-04-11 22:09
    - 4.3K bytes
    - Viewed (0)
Back to top