Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for Stale (0.17 sec)

  1. src/test/java/jcifs/SmbPipeHandleTest.java

            }
    
            /**
             * Verifies that isStale returns true for a stale handle.
             */
            @Test
            public void testIsStale_ReturnsTrueWhenStale() {
                when(smbPipeHandle.isStale()).thenReturn(true);
                assertTrue(smbPipeHandle.isStale(), "isStale() should return true for a stale handle.");
            }
        }
    
        /**
         * Tests the unwrap functionality.
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

          assertEquals(204, it.code)
        }
      }
    
      @Test
      fun staleConnectionNotReusedForNonIdempotentRequest() {
        // Capture the connection so that we can later make it stale.
        var connection: RealConnection? = null
        client =
          client
            .newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

                assertEquals(80, result);
                verify(mockSmbPipeHandleInternal).recv(inB, 40, 40);
            }
    
            @Test
            @DisplayName("Should throw IOException when handle is stale")
            void testDoSendReceiveFragment_StaleHandle() throws Exception {
                DcerpcPipeHandle handle = createMockedDcerpcPipeHandle();
                when(mockSmbPipeHandleInternal.isStale()).thenReturn(true);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            // Simulate invalidation
            assertFalse(handle.isOpen(), "Becomes not open when underlying handle invalid");
    
            // After close, report stale
            handle.close();
            assertTrue(handle.isStale(), "Closed handle reports stale");
        }
    
        @Test
        @DisplayName("getSessionKey propagates CIFSException from session acquisition")
        void getSessionKey_exception_propagates() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

     *   // The resource was cached! Show it.
     * } else {
     *   // The resource was not cached.
     * }
     * ```
     *
     * This technique works even better in situations where a stale response is better than no response.
     * To permit stale cached responses, use the `max-stale` directive with the maximum staleness in
     * seconds:
     *
     * ```java
     * Request request = new Request.Builder()
     *     .cacheControl(new CacheControl.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/CacheBuilder.java

       * implementation; otherwise refreshes will be performed during unrelated cache read and write
       * operations.
       *
       * <p>Currently automatic refreshes are performed when the first stale request for an entry
       * occurs. The request triggering refresh will make a synchronous call to {@link
       * CacheLoader#reload}
       * to obtain a future of the new value. If the returned future is already complete, it is returned
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

            SmbFileHandleImpl fh = target.ensureOpen();
            assertSame(fileHandle, fh);
            assertTrue(target.isOpen());
            assertFalse(target.isStale());
    
            // If handle becomes invalid, reflect stale
            when(fileHandle.isValid()).thenReturn(false);
            assertFalse(target.isOpen());
            assertTrue(target.isStale());
        }
    
        @Test
        @DisplayName("getInput and getOutput throw after close")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

      // TODO GET preferred order - with tests to confirm this
      // 1. successful fresh cached GET response
      // 2. unsuccessful (404, 500) fresh cached GET response
      // 3. successful network response
      // 4. successful stale cached GET response
      // 5. unsuccessful response
      @Test
      fun usesCache() {
        val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

            .header("Cache-Control", "max-stale=180")
            .build()
        val response = client.newCall(request).execute()
        assertThat(response.body.string()).isEqualTo("A")
        assertThat(response.header("Warning")).isEqualTo(
          "110 HttpURLConnection \"Response is stale\"",
        )
      }
    
      @Test
      fun requestMaxStaleDirectiveWithNoValue() {
        // Add a stale response to the cache.
        server.enqueue(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbTreeConnection.java

                try {
                    return send0(loc, request, response, params);
                } catch (final SmbException smbe) {
                    // Retrying only makes sense if the invalid parameter is an tree id. If we have a stale file descriptor
                    // retrying make no sense, as it will never become available again.
                    if (params.contains(RequestParam.NO_RETRY)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 30.4K bytes
    - Viewed (0)
Back to top