Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 277 for enqueue0 (0.35 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/fifo_list_test.go

    	"github.com/google/go-cmp/cmp"
    	fcrequest "k8s.io/apiserver/pkg/util/flowcontrol/request"
    )
    
    func TestFIFOWithEnqueueDequeueSingleRequest(t *testing.T) {
    	req := &request{}
    
    	list := newRequestFIFO()
    	list.Enqueue(req)
    
    	reqGot, ok := list.Dequeue()
    	if !ok {
    		t.Errorf("Expected true, but got: %t", ok)
    	}
    	if req != reqGot {
    		t.Errorf("Expected dequued request: (%p), but got: (%p)", req, reqGot)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 28 08:48:40 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

          return getResponseWithInterceptorChain()
        } finally {
          client.dispatcher.finished(this)
        }
      }
    
      override fun enqueue(responseCallback: Callback) {
        check(executed.compareAndSet(false, true)) { "Already Executed" }
    
        callStart()
        client.dispatcher.enqueue(AsyncCall(responseCallback))
      }
    
      override fun isExecuted(): Boolean = executed.get()
    
      private fun callStart() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

        futureTasks.add(insertAt, task)
    
        // Impact the coordinator if we inserted at the front.
        return insertAt == 0
      }
    
      /**
       * Schedules immediate execution of [Task.tryCancel] on all currently-enqueued tasks. These calls
       * will not be made until any currently-executing task has completed. Tasks that return true will
       * be removed from the execution schedule.
       */
      fun cancelAll() {
        lock.assertNotHeld()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

      @Test
      fun suspendCall() {
        runTest {
          server.enqueue(MockResponse(body = "abc"))
    
          val call = client.newCall(request)
    
          call.executeAsync().use {
            withContext(Dispatchers.IO) {
              assertThat(it.body.string()).isEqualTo("abc")
            }
          }
        }
      }
    
      @Test
      fun timeoutCall() {
        runTest {
          server.enqueue(
            MockResponse.Builder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Apr 18 01:24:38 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/DuplexTest.kt

            .requestIOException()
            .exhaustResponse()
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .code(HttpURLConnection.HTTP_MOVED_PERM)
            .addHeader("Location: /b")
            .streamHandler(body)
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("this is /b")
            .build(),
        )
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  6. pkg/kubelet/util/queue/work_queue_test.go

    	}
    }
    
    func TestGetWork(t *testing.T) {
    	q, clock := newTestBasicWorkQueue()
    	q.Enqueue(types.UID("foo1"), -1*time.Minute)
    	q.Enqueue(types.UID("foo2"), -1*time.Minute)
    	q.Enqueue(types.UID("foo3"), 1*time.Minute)
    	q.Enqueue(types.UID("foo4"), 1*time.Minute)
    	expected := []types.UID{types.UID("foo1"), types.UID("foo2")}
    	compareResults(t, expected, q.GetWork())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            .url(server.url("/"))
            .build()
        client.newCall(request).enqueue(callback)
        callback.await(request.url)
          .assertCode(200)
          .assertHeader("OkHttp-Intercepted", "yep")
      }
    
      @Test
      fun applicationInterceptorsCanMakeMultipleRequestsToServer() {
        server.enqueue(MockResponse.Builder().body("a").build())
        server.enqueue(MockResponse.Builder().body("b").build())
        client =
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/SocksProxyTest.kt

        this.server = server
        socksProxy.play()
      }
    
      @AfterEach
      fun tearDown() {
        socksProxy.shutdown()
      }
    
      @Test
      fun proxy() {
        server.enqueue(MockResponse.Builder().body("abc").build())
        server.enqueue(MockResponse.Builder().body("def").build())
        val client =
          clientTestRule.newClientBuilder()
            .proxy(socksProxy.proxy())
            .build()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. src/reflect/makefunc.go

    // memory.
    //
    //go:nosplit
    func moveMakeFuncArgPtrs(ctxt *makeFuncCtxt, args *abi.RegArgs) {
    	for i, arg := range args.Ints {
    		// Avoid write barriers! Because our write barrier enqueues what
    		// was there before, we might enqueue garbage.
    		if ctxt.regPtrs.Get(i) {
    			*(*uintptr)(unsafe.Pointer(&args.Ptrs[i])) = arg
    		} else {
    			// We *must* zero this space ourselves because it's defined in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:20:05 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top