Selenium grid fix: resolves 5902

This commit is contained in:
Scott Dixon
2016-01-08 14:40:39 -08:00
parent e579024fb2
commit eec2ebd1fc

View File

@@ -66,7 +66,8 @@ async function postRequest (data, addr, port) {
url: `http://${jsonObject.configuration.hubHost}:${jsonObject.configuration.hubPort}/grid/register`,
method: 'POST',
body: data,
headers: post_headers
headers: post_headers,
resolveWithFullResponse: true // return the full response, not just the body
};
if (jsonObject.configuration.register !== true) {
@@ -101,7 +102,8 @@ async function isAlreadyRegistered (jsonObject) {
let response = await request({
uri: `http://${jsonObject.configuration.hubHost}:${jsonObject.configuration.hubPort}/grid/api/proxy?id=${id}`,
method : 'GET',
timeout : 10000
timeout : 10000,
resolveWithFullResponse: true // return the full response, not just the body
});
if (response === undefined || response.statusCode !== 200) {
throw new Error(`Request failed`);