- Revision
- 227122
- Author
- rn...@webkit.org
- Date
- 2018-01-17 22:06:50 -0800 (Wed, 17 Jan 2018)
Log Message
Fix perf dashboard tests for node v8
https://bugs.webkit.org/show_bug.cgi?id=181782
Reviewed by Wenson Hsieh.
Fixed the various tests for node.js v8, which is the latest LTS version.
* server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
after r226836.
* server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
in node.js parses using the local timezone by default.
* server-tests/resources/test-server.js:
(TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
* server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
* unit-tests/measurement-set-tests.js:
(waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (227121 => 227122)
--- trunk/Websites/perf.webkit.org/ChangeLog 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2018-01-18 06:06:50 UTC (rev 227122)
@@ -1,3 +1,23 @@
+2018-01-17 Ryosuke Niwa <rn...@webkit.org>
+
+ Fix perf dashboard tests for node v8
+ https://bugs.webkit.org/show_bug.cgi?id=181782
+
+ Reviewed by Wenson Hsieh.
+
+ Fixed the various tests for node.js v8, which is the latest LTS version.
+
+ * server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
+ after r226836.
+ * server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
+ in node.js parses using the local timezone by default.
+ * server-tests/resources/test-server.js:
+ (TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
+ function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
+ * server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
+ * unit-tests/measurement-set-tests.js:
+ (waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.
+
2018-01-11 Ryosuke Niwa <rn...@webkit.org>
Cannot trigger Dromaeo tests on internal perf try bots
Modified: trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js (227121 => 227122)
--- trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/server-tests/api-manifest-tests.js 2018-01-18 06:06:50 UTC (rev 227122)
@@ -383,7 +383,7 @@
const macTriggerable = Triggerable.findByTestConfiguration(someTest, sierra);
assert.equal(macTriggerable.name(), 'mac-build.webkit.org');
- assert(macTriggerable.acceptsTest(someTest));
+ assert(macTriggerable.acceptedTests().has(someTest));
const groups = macTriggerable.repositoryGroups();
assert.deepEqual(groups.length, 2);
Modified: trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js (227121 => 227122)
--- trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/server-tests/api-measurement-set-tests.js 2018-01-18 06:06:50 UTC (rev 227122)
@@ -65,7 +65,7 @@
const reportWithRevision = [{
"buildNumber": "124",
- "buildTime": "2013-02-28T15:34:51",
+ "buildTime": "2013-02-28T15:34:51Z",
"revisions": {
"WebKit": {
"revision": "144000",
@@ -87,7 +87,7 @@
const reportWithNewRevision = [{
"buildNumber": "125",
- "buildTime": "2013-02-28T21:45:17",
+ "buildTime": "2013-02-28T21:45:17Z",
"revisions": {
"WebKit": {
"revision": "160609",
@@ -109,7 +109,7 @@
const reportWithAncentRevision = [{
"buildNumber": "126",
- "buildTime": "2013-02-28T23:07:25",
+ "buildTime": "2013-02-28T23:07:25Z",
"revisions": {
"WebKit": {
"revision": "137793",
Modified: trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js (227121 => 227122)
--- trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/server-tests/resources/test-server.js 2018-01-18 06:06:50 UTC (rev 227122)
@@ -107,7 +107,7 @@
{
childProcess.execFileSync('rm', ['-rf', this._dataDirectory]);
if (this._backupDataPath)
- fs.rename(this._backupDataPath, this._dataDirectory);
+ fs.renameSync(this._backupDataPath, this._dataDirectory);
}
cleanDataDirectory()
Modified: trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js (227121 => 227122)
--- trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js 2018-01-18 06:06:50 UTC (rev 227122)
@@ -109,15 +109,15 @@
it('should throw assertion error when given a invalid revision', () => {
const fetcher = new OSBuildFetcher({});
- assert.throws(() => fetcher._computeOrder('invalid'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder(''), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('16'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('16D'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('123'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('D123'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('123z'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('16[163'), (error) => error.name == 'AssertionError');
- assert.throws(() => fetcher._computeOrder('16D163['), (error) => error.name == 'AssertionError');
+ assert.throws(() => fetcher._computeOrder('invalid'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder(''), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('16'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('16D'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('123'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('D123'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('123z'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('16[163'), 'AssertionError [ERR_ASSERTION]');
+ assert.throws(() => fetcher._computeOrder('16D163['), 'AssertionError [ERR_ASSERTION]');
})
});
@@ -206,7 +206,7 @@
assert(false, 'should never be reached');
}, (error_output) => {
assert(error_output);
- assert.equal(error_output.name, 'AssertionError');
+ assert.equal(error_output.name, 'AssertionError [ERR_ASSERTION]');
});
});
})
Modified: trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js (227121 => 227122)
--- trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js 2018-01-18 05:55:55 UTC (rev 227121)
+++ trunk/Websites/perf.webkit.org/unit-tests/measurement-set-tests.js 2018-01-18 06:06:50 UTC (rev 227122)
@@ -18,11 +18,7 @@
function waitForMeasurementSet()
{
- return Promise.resolve().then(() => {
- return Promise.resolve();
- }).then(() => {
- return Promise.resolve();
- });
+ return new Promise((resolve) => setTimeout(resolve, 0));
}
describe('findSet', () => {