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)
commit8e365a1c76aad0a596841e97bd0db2301039cc43
treeb96a4913b2c33d3f086dd6cab38fb5a90da1d192
parentee6bca755ba90e72894c3a51d87ff12a3fcc3e4b
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: https://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