jenkins-bot has submitted this change and it was merged.
Change subject: Use parsoid config specified in client config for spawned api
......................................................................
Use parsoid config specified in client config for spawned api
* So far, this config was only used for fetching the page source, when
what we really want is for it to be the config used in the api.
Change-Id: Ief547c2b344982f2b9a04799b6f7d9f191e0baab
---
M tests/client/client.js
M tests/client/config.example.js
2 files changed, 12 insertions(+), 3 deletions(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/client/client.js b/tests/client/client.js
index fe5a4c3..8fc2a3e 100755
--- a/tests/client/client.js
+++ b/tests/client/client.js
@@ -73,7 +73,7 @@
var runTest = function(cb, test) {
rtTest.runTests(test.title, {
- setup: config.setup,
+ setup: require(config.parsoidConfig).setup,
prefix: test.prefix,
rtTestMode: true,
parsoidURL: parsoidURL,
@@ -235,7 +235,15 @@
if (!config.parsoidURL) {
// If no Parsoid server was passed, start our own
- apiServer.startParsoidServer({ quiet: true
}).then(function(ret) {
+ apiServer.startParsoidServer({
+ serverArgv: [
+ // We want the cluster master so that timeouts
on stuck titles
+ // lead to a restart.
+ '--num-workers', '1',
+ '--config', config.parsoidConfig,
+ ],
+ quiet: true,
+ }).then(function(ret) {
parsoidURL = ret.url;
return getGitCommit().spread(getGitCommitCb);
}).done();
diff --git a/tests/client/config.example.js b/tests/client/config.example.js
index bc5e96b..b7db192 100644
--- a/tests/client/config.example.js
+++ b/tests/client/config.example.js
@@ -4,6 +4,7 @@
* Copy this file to config.js and change the values as needed.
*/
'use strict';
+var path = require('path');
(function() {
if (typeof module === 'object') {
@@ -22,7 +23,7 @@
interwiki: 'en',
// By default, use the same configuration as the
testing Parsoid server.
- setup: require('../rttest.localsettings.js').setup,
+ parsoidConfig: path.resolve(__dirname,
'../rttest.localsettings.js'),
// The parsoid API to use. If null, create our own
server
parsoidURL: null,
--
To view, visit https://gerrit.wikimedia.org/r/249012
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ief547c2b344982f2b9a04799b6f7d9f191e0baab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits