Skip to content

Commit

Permalink
Added different timeout for CI test (#554)
Browse files Browse the repository at this point in the history
* Added different timeout for CI test

* Updated CI to warm up backend before test.

* Moved warm up task to a separated job
  • Loading branch information
tim-yao authored Oct 2, 2019
1 parent 01b3f0b commit 367bd2e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ jobs:
- persist_to_workspace:
root: ~/app
paths: .

warm-up:
context: Ripple
docker:
- image: cypress/base:10
steps:
- run:
name: Awake dev backend
command: curl https://www.develop.content.vic.gov.au/ --max-time 1000

test:
context: Ripple
docker:
Expand Down Expand Up @@ -247,6 +257,7 @@ workflows:
only:
- develop
jobs:
- warm-up
- build
- test:
requires:
Expand Down
9 changes: 8 additions & 1 deletion packages/ripple-nuxt-tide/lib/core/tide.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,16 @@ export const tide = (axios, site, config) => ({
// Build the axios config for Tide GET request
_axiosConfig: function (headersConfig) {
// axios config
let axiosTimeout = 4000

// Give more time in Circle CI test
if (process.env.NODE_ENV === 'test' || process.env.TEST) {
axiosTimeout = 9000
}

const axiosConfig = {
auth: config.auth,
timeout: 4000,
timeout: axiosTimeout,
headers: {}
}

Expand Down

0 comments on commit 367bd2e

Please sign in to comment.