Make server tests return a promise instead of manually calling done
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 03:19:02 +0000 (03:19 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 03:19:02 +0000 (03:19 +0000)
commit8c0771ebb97653316c9cd3c2507830783132cbc9
treeb96a4913b2c33d3f086dd6cab38fb5a90da1d192
parentbd82c3059d49a9dd3641f1f376d9aee0d050556e
Make server tests return a promise instead of manually calling done
https://bugs.webkit.org/show_bug.cgi?id=169648

Rubber-stamped by Chris Dumez.

Make the existing server tests always reutrn a promise instead of manually calling "done" callback.
The promise tests are a lot more stable and less error prone.

Also use arrow functions everywhere and use prepareServerTest, renamed from connectToDatabaseInEveryTest,
in more tests instead of manually connecting to database in every test, and reset v3 models.

* server-tests/admin-platforms-tests.js:
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-build-requests-tests.js:
* server-tests/api-manifest.js:
* server-tests/api-measurement-set-tests.js:
(.postReports): Deleted. Not used in any test.
* server-tests/api-report-commits-tests.js:
* server-tests/api-report-tests.js:
* server-tests/api-update-triggerable.js:
* server-tests/privileged-api-upate-run-status.js:
* server-tests/resources/common-operations.js:
(prepareServerTest): Renamed from connectToDatabaseInEveryTest. Increase the timeout and reset v3 models.
* server-tests/tools-buildbot-triggerable-tests.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@213969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/server-tests/admin-platforms-tests.js
Websites/perf.webkit.org/server-tests/admin-reprocess-report-tests.js
Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
Websites/perf.webkit.org/server-tests/api-commits.js
Websites/perf.webkit.org/server-tests/api-manifest.js
Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js
Websites/perf.webkit.org/server-tests/api-report-commits-tests.js
Websites/perf.webkit.org/server-tests/api-report-tests.js
Websites/perf.webkit.org/server-tests/api-update-triggerable.js
Websites/perf.webkit.org/server-tests/privileged-api-upate-run-status.js
Websites/perf.webkit.org/server-tests/resources/common-operations.js
Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js