Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for AssertionError (0.2 sec)

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

            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              try {
                Thread.sleep(500)
              } catch (e: InterruptedException) {
                throw AssertionError()
              }
              assertFailsWith<IOException> {
                response.body.source().readUtf8()
              }.also { expected ->
                exceptionRef.set(expected)
                latch.countDown()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. settings.gradle.kts

      include(":android-test")
      include(":android-test-app")
    }
    
    enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
    
    /**
     * Avoid a crash in IntelliJ triggered by Android submodules.
     *
     * ```
     * java.lang.AssertionError: Can't find built-in class kotlin.Cloneable
     *   at org.jetbrains.kotlin.builtins.KotlinBuiltIns.getBuiltInClassByFqName(KotlinBuiltIns.java:217)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Apr 14 14:24:05 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

              }
              "sha1" -> {
                if (sha1 == null) sha1 = peerCertificate.sha1Hash()
                if (pin.hash == sha1) return // Success!
              }
              else -> throw AssertionError("unsupported hashAlgorithm: ${pin.hashAlgorithm}")
            }
          }
        }
    
        // If we couldn't find a matching pin, format a nice exception.
        val message =
          buildString {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

                }
    
                override fun connectFailed(
                  uri: URI,
                  address: SocketAddress,
                  failure: IOException,
                ) {
                  throw AssertionError()
                }
              },
            )
            .build()
        server2.enqueue(
          MockResponse(body = "This is the 2nd server!"),
        )
        server.enqueue(
          MockResponse(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/WebPlatformToAsciiTest.kt

            testToAscii(entry.input!!, entry.output, entry.comment)
          } catch (e: Throwable) {
            failure = e
          }
    
          if (entry.input in knownFailures) {
            if (failure == null) failures += AssertionError("known failure didn't fail: $entry")
          } else {
            if (failure != null) failures += failure
          }
        }
    
        if (failures.isNotEmpty()) {
          for (failure in failures) {
            println(failure)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      }
    
      @Test
      fun webSocketAndNetworkInterceptors() {
        client =
          client.newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                throw AssertionError() // Network interceptors don't execute.
              },
            )
            .build()
        webServer.enqueue(
          MockResponse.Builder()
            .webSocketUpgrade(serverListener)
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            override fun checkServerTrusted(
              chain: Array<X509Certificate>,
              authType: String,
            ) = throw AssertionError()
    
            override fun getAcceptedIssuers(): Array<X509Certificate> = throw AssertionError()
          }
    
        private val logger = Logger.getLogger(MockWebServer::class.java.name)
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

              return null
            }
    
            override fun connectFailed(
              uri: URI,
              socketAddress: SocketAddress,
              e: IOException,
            ) {
              throw AssertionError()
            }
          }
    
        val address =
          factory.newAddress(
            proxySelector = nullProxySelector,
          )
        val routeSelector = newRouteSelector(address)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

          while (true) {
            val event = takeEvent()
            if (eventClass.isInstance(event)) {
              return eventClass.cast(event)
            }
          }
        } catch (e: NoSuchElementException) {
          throw AssertionError("full event sequence: $fullEventSequence", e)
        }
      }
    
      inline fun <reified T : CallEvent> removeUpToEvent(): T = removeUpToEvent(T::class.java)
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

      }
    
      private fun <T> finished(
        calls: Deque<T>,
        call: T,
      ) {
        val idleCallback: Runnable?
        this.withLock {
          if (!calls.remove(call)) throw AssertionError("Call wasn't in-flight!")
          idleCallback = this.idleCallback
        }
    
        val isRunning = promoteAndExecute()
    
        if (!isRunning && idleCallback != null) {
          idleCallback.run()
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top