Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for AssertionError (0.35 sec)

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

          val call = i.next()
          if (call.request.url.toString() == url) {
            i.remove()
            dispatcherTest.dispatcher.finishedAccessor(call)
            return
          }
        }
        throw AssertionError("No such job: $url")
      }
    
      override fun shutdown() {
        shutdown = true
      }
    
      override fun shutdownNow(): List<Runnable> {
        throw UnsupportedOperationException()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt

        if (cancel) {
          cancel = false
          eventSource.cancel()
        }
      }
    
      private fun nextEvent(): Any {
        return events.poll(10, TimeUnit.SECONDS)
          ?: throw AssertionError("Timed out waiting for event.")
      }
    
      fun assertExhausted() {
        assertThat(events).isEmpty()
      }
    
      fun assertEvent(
        id: String?,
        type: String?,
        data: String,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

        if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) {
          throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
        }
      }
    
      @Suppress("NOTHING_TO_INLINE")
      internal inline fun Any.assertThreadDoesntHoldLock() {
        if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) {
          throw AssertionError("Thread ${Thread.currentThread().name} MUST NOT hold lock on $this")
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        try {
          ensureAllConnectionsReleased()
          releaseClient()
        } catch (ae: AssertionError) {
          result += ae
        }
    
        try {
          if (taskQueuesWereIdle) {
            ensureAllTaskQueuesIdle()
          }
        } catch (ae: AssertionError) {
          result += ae
        }
    
        if (result != null) throw result
      }
    
      private fun releaseClient() {
    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)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        } else {
          events.add(Failure(t, response))
        }
      }
    
      private fun nextEvent(): Any {
        return events.poll(10, TimeUnit.SECONDS)
          ?: throw AssertionError("Timed out waiting for event.")
      }
    
      fun assertTextMessage(payload: String?) {
        assertThat(nextEvent()).isEqualTo(Message(string = payload))
      }
    
      fun assertBinaryMessage(payload: ByteString?) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/DispatcherTest.kt

              Interceptor { chain: Interceptor.Chain? ->
                try {
                  ready.countDown()
                  waiting.await()
                } catch (e: InterruptedException) {
                  throw AssertionError()
                }
                throw IOException()
              },
            )
            .build()
        val a1 = client.newCall(newRequest("http://a/1"))
        val a2 = client.newCall(newRequest("http://a/2"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/test/kotlin/okhttp3/OkHttpClientTestRuleTest.kt

        val thread =
          object : Thread() {
            override fun run() {
              throw RuntimeException("boom!")
            }
          }
        thread.start()
        thread.join()
    
        assertFailsWith<AssertionError> {
          testRule.afterEach(extensionContext)
        }.also { expected ->
          assertThat(expected).hasMessage("uncaught exception thrown during test")
          assertThat(expected.cause!!).hasMessage("boom!")
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt

        requestBodySinks.add(sink)
      }
    
      override fun isDuplex(): Boolean = true
    
      @Throws(InterruptedException::class)
      fun takeSink(): BufferedSink {
        return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take")
      }
    
      fun assertNoMoreSinks() {
        assertTrue(requestBodySinks.isEmpty())
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

            arrayOf<KeyManager>(keyManager),
            arrayOf<TrustManager>(trustManager),
            SecureRandom(),
          )
          sslContext.socketFactory
        } catch (e: GeneralSecurityException) {
          throw AssertionError(e)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallTest.kt

              e: IOException,
            ) {
              throw AssertionError()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              try {
                responseRef.put(response)
              } catch (e: InterruptedException) {
                throw AssertionError()
              }
            }
          },
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
Back to top