Searched refs:connection (Results 1 - 12 of 12) sorted by relevance

/libcore/luni/src/test/java/libcore/sqlite/
H A DQueryTimeoutTest.java43 private Connection connection; field in class:QueryTimeoutTest
47 connection = Support_SQL.getConnection();
58 Database database = ((JDBCConnection) connection).getSQLiteDatabase();
74 connection.setAutoCommit(true);
78 connection.close();
85 statement = connection.createStatement();
95 PreparedStatement statement = connection.prepareStatement(FETCH_QUERY);
113 PreparedStatement statement = connection.prepareStatement(EXEC_QUERY);
125 connection.setAutoCommit(true);
126 PreparedStatement statement = connection
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DURLConnectionTest.java219 HttpURLConnection connection = (HttpURLConnection) server.getUrl("/").openConnection();
220 assertNull(connection.getErrorStream());
226 HttpURLConnection connection = (HttpURLConnection) server.getUrl("/").openConnection();
227 assertEquals("A", readAscii(connection.getErrorStream(), Integer.MAX_VALUE));
231 // recycled connection doesn't get the unread tail of the first request's response.
310 .setBody("This connection won't pool properly")
312 server.enqueue(new MockResponse().setBody("This comes after a busted connection"));
315 assertContent("This connection won't pool properly", server.getUrl("/a").openConnection());
317 assertContent("This comes after a busted connection", server.getUrl("/b").openConnection());
318 // sequence number 0 means the HTTP socket connection wa
2351 assertContent(String expected, URLConnection connection, int limit) argument
2358 assertContent(String expected, URLConnection connection) argument
[all...]
H A DURLStreamHandlerFactoryTest.java58 URLConnection connection = url.openConnection();
59 assertTrue(connection instanceof Handler.HandlerURLConnection);
81 URLConnection connection = new URL("http://android.com/").openConnection();
82 assertTrue(connection instanceof Handler.HandlerURLConnection);
93 // creating a connection should use the platform's default stream handler
98 // set the property and get another connection. The property should not be honored
H A DOldJarURLConnectionTest.java162 JarURLConnection connection = (JarURLConnection) url.openConnection();
164 connection.connect();
171 connection.getJarFile();
231 JarURLConnection connection = (JarURLConnection) url.openConnection();
232 connection.setUseCaches(false);
233 connection.getInputStream();
234 InputStream in = connection.getInputStream();
235 JarFile jarFile1 = connection.getJarFile();
236 JarEntry jarEntry1 = connection.getJarEntry();
239 JarFile jarFile2 = connection
[all...]
H A DCookiesTest.java329 HttpURLConnection connection = (HttpURLConnection) server.getUrl("/").openConnection();
331 connection.getRequestProperties());
333 connection.setRequestProperty("Foo", "foo");
334 connection.setDoOutput(true);
335 connection.getOutputStream().write(5);
336 connection.getOutputStream().close();
337 connection.getInputStream().close();
352 assertContainsAll(connection.getRequestProperties().keySet(), "Foo");
353 assertContainsAll(connection.getRequestProperties().keySet(),
355 assertContainsAll(connection
[all...]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/
H A DHttpsURLConnectionTest.java84 // read/connection timeout value
133 // create url connection to be tested
135 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
136 connection.setSSLSocketFactory(ctx.getSocketFactory());
139 SSLSocket peerSocket = (SSLSocket) doInteraction(connection, ss);
141 // check the connection state
142 checkConnectionStateParameters(connection, peerSocket);
145 connection.connect();
149 * Tests the behaviour of HTTPS connection in case of unavailability
164 // create url connection t
1062 private HttpsURLConnection connection; field in class:HttpsURLConnectionTest.ClientConnectionWork
1068 ClientConnectionWork(HttpsURLConnection connection) argument
[all...]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
H A DHttpURLConnectionTest.java103 // this connection was closed, create new one:
131 * Selector will return the proxy, only if the connection
186 * method will be used for connection to the server
195 HttpURLConnection connection = (HttpURLConnection) url
199 connection.setConnectTimeout(2000);
200 connection.setReadTimeout(2000);
211 connection.connect();
217 assertTrue("Connection does not use proxy", connection.usingProxy());
226 * will be used for connection to the server
242 HttpURLConnection connection
[all...]
/libcore/luni/src/test/java/tests/api/javax/net/ssl/
H A DHttpsURLConnectionTest.java59 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
61 connection.getCipherSuite();
75 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
77 connection.getLocalCertificates();
127 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
129 connection.getLocalPrincipal();
145 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
147 connection.getPeerPrincipal();
168 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
170 connection
[all...]
/libcore/luni/src/main/java/java/net/
H A DResponseCache.java75 * @param connection
76 * the connection to fetch the response.
84 public abstract CacheRequest put(URI uri, URLConnection connection) throws IOException; argument
/libcore/benchmarks/src/benchmarks/regression/
H A DHostnameVerifierBenchmark.java33 * This benchmark makes a real HTTP connection to a handful of hosts and
55 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
56 connection.setHostnameVerifier(new HostnameVerifier() {
67 connection.getInputStream();
68 connection.disconnect();
H A DURLConnectionBenchmark.java83 HttpURLConnection connection = (HttpURLConnection) url.openConnection();
84 // URLConnection connection = url.openConnection();
85 InputStream in = connection.getInputStream();
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
H A DURLConnectionTest.java95 // state of connection is checked first
129 // state of connection is checked first
288 HttpURLConnection connection = (HttpURLConnection)
292 connection.setDoOutput(true);
294 = new OutputStreamWriter(connection.getOutputStream());
297 assertEquals(200, connection.getResponseCode());
810 assertTrue("Not more than one header in URL connection",
1135 URLConnection connection = url.openConnection();
1141 connection.setIfModifiedSince(sinceTime);
1142 assertEquals("Wrong date set", sinceTime, connection
[all...]

Completed in 831 milliseconds