Skip to content

Commit

Permalink
extend timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch committed Nov 4, 2020
1 parent e244600 commit c9b05cc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .kokoro/build-with-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ export CLOUD_SQL_CONNECTION_NAME=$(cat $KOKORO_GFILE_DIR/secrets-pg-connection-n
export IDP_KEY=$(gcloud secrets versions access latest --secret="nodejs-docs-samples-idp-key" --project="${GOOGLE_CLOUD_PROJECT}")

npm test
set -x
npm run --if-present system-test
set +x
2 changes: 1 addition & 1 deletion run/markdown-preview/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"start": "node index.js",
"test": "mocha test/app.test.js --timeout=10000 --exit",
"system-test": "mocha test/system.test.js --timeout=300000"
"system-test": "mocha test/system.test.js --timeout=480000 --exit"
},
"dependencies": {
"express": "^4.17.1",
Expand Down
2 changes: 1 addition & 1 deletion run/markdown-preview/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"start": "node index.js",
"test": "mocha test/app.test.js --exit",
"system-test": "mocha test/system.test.js --timeout=10000 --exit"
"system-test": "mocha test/system.test.js --timeout=180000 --exit"
},
"dependencies": {
"express": "^4.17.1",
Expand Down
6 changes: 3 additions & 3 deletions run/markdown-preview/renderer/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const {execSync} = require('child_process');
const {GoogleAuth} = require('google-auth-library');
const auth = new GoogleAuth();

const request = (method, route, base_url) => {
const request = (method, route, base_url, id_token) => {
return got(route, new URL(base_url.trim()), {
headers: {
Authorization: ID_TOKEN.trim(),
Authorization: id_token.trim(),
},
method: method || 'get',
throwHttpErrors: false,
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('End-to-End Tests', () => {
});

it('post(/) without body is a bad request', async () => {
const response = await request('post', '/', BASE_URL);
const response = await request('post', '/', BASE_URL, ID_TOKEN);
assert.strictEqual(
response.statusCode,
400,
Expand Down

0 comments on commit c9b05cc

Please sign in to comment.