Skip to content

Commit

Permalink
fix: change default timeout to 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
jpill committed Jan 8, 2024
1 parent a27fe31 commit 2c187bb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@

* bump version number ([2eb5d71](https://www.github.com/ShipEngine/shipengine-php/commit/2eb5d710f82ccefd2110a720394234e47e38040e))
* implement CD w/ release please ([5325e40](https://www.github.com/ShipEngine/shipengine-php/commit/5325e40f0bff35f8cda1fc5f67ce5f461345a905))

## 1.0.1

### Changes

* increase default timeout from 15s to 60s
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $config = array(
'apiKey' => $apiKey,
'pageSize' => 75,
'retries' => 3,
'timeout' => \DateInterval('PT15S')
'timeout' => \DateInterval('PT60S')
);

$shipengine = new ShipEngine($config);
Expand Down
2 changes: 1 addition & 1 deletion src/ShipEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class ShipEngine
/**
* ShipEngine SDK Version
*/
public const VERSION = '1.0.0';
public const VERSION = '1.0.1';

// /**
// *
Expand Down
26 changes: 13 additions & 13 deletions tests/ShipEngineConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function setUpBeforeClass(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -54,7 +54,7 @@ public static function setUpBeforeClass(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
)
);
// self::$goodAddress = new Address(
Expand All @@ -81,7 +81,7 @@ public function testNoAPIKey(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -108,7 +108,7 @@ public function testEmptyAPIKey(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -135,7 +135,7 @@ public function testInvalidRetries(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => -7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand Down Expand Up @@ -249,7 +249,7 @@ public function testMergeApiKey(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -266,7 +266,7 @@ public function testMergeBaseUrl(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -283,7 +283,7 @@ public function testMergePageSize(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -300,7 +300,7 @@ public function testMergeRetries(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand All @@ -317,7 +317,7 @@ public function testMergeTimeout(): void
'baseUrl' => self::$test_url,
'pageSize' => 75,
'retries' => 7,
'timeout' => new DateInterval('PT15S'),
'timeout' => new DateInterval('PT60S'),
'events' => null
)
);
Expand Down Expand Up @@ -346,7 +346,7 @@ public function testMergeTimeout(): void
// 'baseUrl' => self::$test_url,
// 'pageSize' => 75,
// 'retries' => 0,
// 'timeout' => new DateInterval('PT15S'),
// 'timeout' => new DateInterval('PT60S'),
// )
// );
// $shipengine->validateAddress($address429);
Expand Down Expand Up @@ -380,7 +380,7 @@ public function testMergeTimeout(): void
// 'apiKey' => 'baz',
// 'baseUrl' => self::$test_url,
// 'pageSize' => 75,
// 'timeout' => new DateInterval('PT15S'),
// 'timeout' => new DateInterval('PT60S'),
// )
// );
// $shipengine->validateAddress($address429);
Expand Down Expand Up @@ -418,7 +418,7 @@ public function testMergeTimeout(): void
// 'baseUrl' => self::$test_url,
// 'pageSize' => 75,
// 'retries' => 3,
// 'timeout' => new DateInterval('PT15S'),
// 'timeout' => new DateInterval('PT60S'),
// )
// );
// $shipengine->validateAddress($address429);
Expand Down
4 changes: 2 additions & 2 deletions tests/ShipEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function setUpBeforeClass(): void
'baseUrl' => 'https://api.shipengine.com',
'pageSize' => 75,
'retries' => 7,
'timeout' => new \DateInterval('PT15S'),
'timeout' => new \DateInterval('PT60S'),
)
);
}
Expand All @@ -46,7 +46,7 @@ public function testInstantiation(): void
'baseUrl' => 'https://api.shipengine.com',
'pageSize' => 75,
'retries' => 7,
'timeout' => new \DateInterval('PT15S'),
'timeout' => new \DateInterval('PT60S'),
)
);
$this->assertInstanceOf(ShipEngine::class, $shipengineInit);
Expand Down

0 comments on commit 2c187bb

Please sign in to comment.