Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update timeout to 60s #28

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
* 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))
* Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f))
* Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff))

## 1.0.3

### Changes

* increase default timeout to 60s
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ShipEngineDemo {
put("apiKey", "<YOUR_API_KEY_HERE>");
put("pageSize", 75);
put("retries", 3);
put("timeout", 8000);
put("timeout", 60000);
}});
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.shipengine</groupId>
<artifactId>shipengine</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>

<name>ShipEngine SDK</name>
<description>The official Java SDK for ShipEngine API.</description>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/shipengine/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void setBaseUrl(String baseUrl) {
/**
* Client timeout in milliseconds.
*/
private int timeout = 5000;
private int timeout = 60000;

public Config(Map<String, Object> config) {
if (config.containsKey("apiKey")) {
Expand Down Expand Up @@ -114,7 +114,7 @@ public void setApiKey(String apiKey) throws ValidationException {
* The maximum amount of time (in milliseconds) to wait for a response from the
* ShipEngine server.
*
* Defaults to 5000 (5 seconds).
* Defaults to 60000 (60 seconds).
*/
public int getTimeout() {
return timeout;
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/shipengine/ShipEngineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ShipEngineTest {
"apiKey", Constants.API_KEY,
"baseUrl", Constants.TEST_URL,
"retries", 8,
"timeout", 8000
"timeout", 60000
);

@Before
Expand Down Expand Up @@ -77,10 +77,10 @@ public void successfulInstantiationWithStringAPIKey() {

@Test(timeout = 1500)
public void successfulInstantiationWithIndividualArgs() {
ShipEngine shipengine = new ShipEngine(stubApiKey, 8000, 3, 75);
ShipEngine shipengine = new ShipEngine(stubApiKey, 60000, 3, 75);
assertEquals(stubApiKey, shipengine.getConfig().getApiKey());
assertEquals(3, shipengine.getConfig().getRetries());
assertEquals(8000, shipengine.getConfig().getTimeout());
assertEquals(60000, shipengine.getConfig().getTimeout());
assertEquals(75, shipengine.getConfig().getPageSize());
}

Expand Down
Loading