Skip to content

Commit f8bca01

Browse files
committed
fix: update timeout to 60s
1 parent bf68736 commit f8bca01

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@
99
* Fixed bug in deriveUserAgent method in the InternalClient now reads sdk version from resources/project.properties instead of version.txt. ([2aa3d13](https://github.com/ShipEngine/shipengine-java/commit/2aa3d133756cfb311beb10bec3474dfad91bffef))
1010
* Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f))
1111
* Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff))
12+
13+
## 1.0.3
14+
15+
### Changes
16+
17+
* increase default timeout to 60s

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class ShipEngineDemo {
4545
put("apiKey", "<YOUR_API_KEY_HERE>");
4646
put("pageSize", 75);
4747
put("retries", 3);
48-
put("timeout", 8000);
48+
put("timeout", 60000);
4949
}});
5050
}
5151
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.shipengine</groupId>
88
<artifactId>shipengine</artifactId>
9-
<version>1.0.2</version>
9+
<version>1.0.3</version>
1010

1111
<name>ShipEngine SDK</name>
1212
<description>The official Java SDK for ShipEngine API.</description>

src/main/java/com/shipengine/Config.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void setBaseUrl(String baseUrl) {
2424
/**
2525
* Client timeout in milliseconds.
2626
*/
27-
private int timeout = 5000;
27+
private int timeout = 60000;
2828

2929
public Config(Map<String, Object> config) {
3030
if (config.containsKey("apiKey")) {
@@ -114,7 +114,7 @@ public void setApiKey(String apiKey) throws ValidationException {
114114
* The maximum amount of time (in milliseconds) to wait for a response from the
115115
* ShipEngine server.
116116
*
117-
* Defaults to 5000 (5 seconds).
117+
* Defaults to 60000 (60 seconds).
118118
*/
119119
public int getTimeout() {
120120
return timeout;

src/test/java/com/shipengine/ShipEngineTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class ShipEngineTest {
4242
"apiKey", Constants.API_KEY,
4343
"baseUrl", Constants.TEST_URL,
4444
"retries", 8,
45-
"timeout", 8000
45+
"timeout", 60000
4646
);
4747

4848
@Before
@@ -77,10 +77,10 @@ public void successfulInstantiationWithStringAPIKey() {
7777

7878
@Test(timeout = 1500)
7979
public void successfulInstantiationWithIndividualArgs() {
80-
ShipEngine shipengine = new ShipEngine(stubApiKey, 8000, 3, 75);
80+
ShipEngine shipengine = new ShipEngine(stubApiKey, 60000, 3, 75);
8181
assertEquals(stubApiKey, shipengine.getConfig().getApiKey());
8282
assertEquals(3, shipengine.getConfig().getRetries());
83-
assertEquals(8000, shipengine.getConfig().getTimeout());
83+
assertEquals(60000, shipengine.getConfig().getTimeout());
8484
assertEquals(75, shipengine.getConfig().getPageSize());
8585
}
8686

0 commit comments

Comments
 (0)