Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for openConnections (0.11 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        }
    
      private fun AddressState.scheduleOpener() {
        queue.schedule(
          object : Task("$okHttpName ConnectionPool connection opener") {
            override fun runOnce(): Long = openConnections(this@scheduleOpener)
          },
        )
      }
    
      /**
       * Holding the lock of the connection being added or removed when mutating this, and check its
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jun 03 17:10:08 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

      private val requestQueue = LinkedBlockingQueue<RecordedRequest>()
      private val openClientSockets =
        Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>())
      private val openConnections =
        Collections.newSetFromMap(ConcurrentHashMap<Http2Connection, Boolean>())
    
      private val atomicRequestCount = AtomicInteger()
    
      private var serverSocketFactory_: ServerSocketFactory? = null
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/HandlerTest.java

        }
    
        @Test
        @DisplayName("openConnection creates SmbFile for valid URL")
        void testOpenConnectionWithValidUrl() throws IOException {
            // Arrange - Create URL with handler
            URL url = new URL(null, "smb://host/share", handler);
    
            // Act
            URLConnection conn = handler.openConnection(url);
    
            // Assert
            assertNotNull(conn);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  4. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

        }
      }
    
      @Test
      fun testUrlConnectionDirect() {
        testRequest {
          val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
    
          val connection = url.openConnection() as HttpURLConnection
    
          assertThat(
            connection.inputStream
              .source()
              .buffer()
              .readUtf8(),
          ).contains("Peter the person")
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/http/HandlerTest.java

                @Override
                protected URLConnection openConnection(URL u) throws IOException {
                    return mock(HttpURLConnection.class);
                }
            };
    
            // Create mock HTTPS handler
            URLStreamHandler httpsHandler = new URLStreamHandler() {
                @Override
                protected URLConnection openConnection(URL u) throws IOException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        server.enqueue(MockResponse())
        try {
          server
            .url("/a")
            .toUrl()
            .openConnection()
            .getInputStream()
          fail<Any>()
        } catch (expected: IOException) {
        }
        server
          .url("/b")
          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        server.enqueue(MockResponse())
        try {
          server
            .url("/a")
            .toUrl()
            .openConnection()
            .getInputStream()
          fail<Unit>()
        } catch (expected: IOException) {
          // Expected.
        }
        server
          .url("/b")
          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      @Test
      fun clearDispatcherQueue() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/HandlerTest.java

        }
    
        @Test
        @DisplayName("openConnection with null URL throws NullPointerException")
        void testOpenConnection_NullInput() {
            // Arrange
            Handler handler = newHandlerWith(mockCtx);
    
            // Act & Assert
            assertThrows(NullPointerException.class, () -> handler.openConnection(null), "Null URL should throw NPE");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

              return MockResponse()
            }
          }
        assertThat(requestsMade.size).isEqualTo(0)
        mockWebServer.dispatcher = dispatcher
        val url = mockWebServer.url("/").toUrl()
        val conn = url.openConnection() as HttpURLConnection
        conn.responseCode // Force the connection to hit the "server".
        // Make sure our dispatcher got the request.
        assertThat(requestsMade.size).isEqualTo(1)
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/io/ClassTraversalTest.java

            final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class";
            final URL classURL = ResourceUtil.getResource(classFilePath);
            final JarURLConnection con = (JarURLConnection) classURL.openConnection();
            ClassTraversalUtil.forEach(con.getJarFile(), (ClassHandler) (packageName, shortClassName) -> {
                if (count < 10) {
                    System.out.println(ClassUtil.concatName(packageName, shortClassName));
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 5.1K bytes
    - Viewed (0)
Back to top