FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
serpapi-java/src/test/java/serpapi/TimeoutTest.java at master · serpapi/serpapi-java · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
serpapi
/
serpapi-java
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
8
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
serpapi-java
/
src
/
test
/
java
/
serpapi
/
TimeoutTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (23 loc) · 817 Bytes
Breadcrumbs
serpapi-java
/
src
/
test
/
java
/
serpapi
/
TimeoutTest.java
Copy path
File metadata and controls
30 lines (23 loc) · 817 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package
serpapi
;
import
org
.
junit
.
Test
;
import
java
.
util
.
HashMap
;
import
static
org
.
junit
.
Assert
.*;
/**
* Test that the client timeout is applied to reading as well as connecting.
*
* Offline: only client configuration is inspected, so no network call and no
* SERPAPI_KEY are needed.
*/
public
class
TimeoutTest
{
@
Test
public
void
appliesTimeoutToBothConnectAndRead
() {
SerpApi
serpapi
=
new
SerpApi
(
new
HashMap
<>());
assertEquals
(
serpapi
.
timeout
.
intValue
(),
serpapi
.
getClient
().
getHttpConnectionTimeout
());
assertEquals
(
serpapi
.
timeout
.
intValue
(),
serpapi
.
getClient
().
getHttpReadTimeout
());
}
@
Test
public
void
defaultTimeoutSurvivesTheSlowestEngines
() {
// home_depot has repeatedly taken longer than a minute to respond.
assertTrue
(
new
SerpApi
().
timeout
>
60000
);
}
}
Back
|
FazBrowse Home
|
New Git URL