Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for disconnectAtStart (0.11 sec)

  1. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

      /** Confirm suppressed exceptions that occur after connecting are returned. */
      @Test fun httpExceptionsAreReturnedAsSuppressed() {
        server.enqueue(MockResponse(socketPolicy = DisconnectAtStart))
        server.enqueue(MockResponse(socketPolicy = DisconnectAtStart))
    
        client =
          client.newBuilder()
            .dns(DoubleInetAddressDns()) // Two routes so we get two failures.
            .build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

            .setHeader("Sec-WebSocket-Accept", "ujmZX4KXZqjwy6vi1aQFH5p4Ygk=")
            .build(),
        )
        webServer.enqueue(
          MockResponse.Builder()
            .socketPolicy(SocketPolicy.DisconnectAtStart)
            .build(),
        )
        val webSocket = newWebSocket()
        clientListener.assertFailure(
          101,
          null,
          ProtocolException::class.java,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

    package okhttp3.mockwebserver
    
    import java.util.concurrent.TimeUnit.MILLISECONDS
    import mockwebserver3.SocketPolicy.DisconnectAfterRequest
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import mockwebserver3.SocketPolicy.DisconnectAtStart
    import mockwebserver3.SocketPolicy.DisconnectDuringRequestBody
    import mockwebserver3.SocketPolicy.DisconnectDuringResponseBody
    import mockwebserver3.SocketPolicy.DoNotReadRequestBody
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      /**
       * Request immediate close of connection without even reading the request. Use to simulate buggy
       * SSL servers closing connections in response to unrecognized TLS extensions.
       */
      object DisconnectAtStart : SocketPolicy
    
      /**
       * Close connection after reading the request but before writing the response. Use this to
       * simulate late connection pool failures.
       */
      object DisconnectAfterRequest : SocketPolicy
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. mockwebserver/api/mockwebserver3.api

    	public static final field INSTANCE Lmockwebserver3/SocketPolicy$DisconnectAtEnd;
    }
    
    public final class mockwebserver3/SocketPolicy$DisconnectAtStart : mockwebserver3/SocketPolicy {
    	public static final field INSTANCE Lmockwebserver3/SocketPolicy$DisconnectAtStart;
    }
    
    public final class mockwebserver3/SocketPolicy$DisconnectDuringRequestBody : mockwebserver3/SocketPolicy {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  6. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
      }
    
      @Disabled("Not actually failing where expected")
      @Test
      fun disconnectAtStart() {
        server.enqueue(
          MockResponse.Builder()
            .socketPolicy(DisconnectAtStart)
            .build(),
        )
        server.enqueue(MockResponse()) // The jdk's HttpUrlConnection is a bastard.
        server.enqueue(MockResponse())
        try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

    import javax.net.ssl.TrustManager
    import javax.net.ssl.X509TrustManager
    import mockwebserver3.SocketPolicy.DisconnectAfterRequest
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import mockwebserver3.SocketPolicy.DisconnectAtStart
    import mockwebserver3.SocketPolicy.DisconnectDuringRequestBody
    import mockwebserver3.SocketPolicy.DisconnectDuringResponseBody
    import mockwebserver3.SocketPolicy.DoNotReadRequestBody
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
      }
    
      @Disabled("Not actually failing where expected")
      @Test
      fun disconnectAtStart() {
        server.enqueue(
          MockResponse()
            .setSocketPolicy(SocketPolicy.DISCONNECT_AT_START),
        )
        server.enqueue(MockResponse()) // The jdk's HttpUrlConnection is a bastard.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

    import mockwebserver3.QueueDispatcher
    import mockwebserver3.RecordedRequest
    import mockwebserver3.SocketPolicy.DisconnectAfterRequest
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import mockwebserver3.SocketPolicy.DisconnectAtStart
    import mockwebserver3.SocketPolicy.FailHandshake
    import mockwebserver3.SocketPolicy.HalfCloseAfterRequest
    import mockwebserver3.SocketPolicy.NoResponse
    import mockwebserver3.SocketPolicy.StallSocketAtStart
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          sinkReference.get().write("ghi".toByteArray())
          sinkReference.get().emit()
        }
      }
    
      @Test
      fun getHeadersThrows() {
        server.enqueue(MockResponse(socketPolicy = SocketPolicy.DisconnectAtStart))
        assertFailsWith<IOException> {
          getResponse(newRequest("/"))
        }
      }
    
      @Test
      fun dnsFailureThrowsIOException() {
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top