Skip to content

Commit 6a84567

Browse files
committed
avoid port collisions in proxy_spec
1 parent fcba86d commit 6a84567

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/proxy_spec.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ var WebSocket = require("ws");
88

99
var ConfigurableProxy = require("../lib/configproxy").ConfigurableProxy;
1010

11+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
12+
1113
describe("Proxy Tests", function () {
1214
var port = 8902;
1315
var testPort = port + 10;
@@ -268,10 +270,10 @@ describe("Proxy Tests", function () {
268270
});
269271

270272
it("custom error target", function (done) {
271-
var port = 55555;
273+
var proxyPort = 55550;
272274
util
273-
.setupProxy(port, { errorTarget: "http://127.0.0.1:55565" }, [])
274-
.then(() => r("http://127.0.0.1:" + port + "/foo/bar"))
275+
.setupProxy(proxyPort, { errorTarget: "http://127.0.0.1:55565" }, [])
276+
.then(() => r("http://127.0.0.1:" + proxyPort + "/foo/bar"))
275277
.then((body) => done.fail("Expected 404"))
276278
.catch((err) => {
277279
expect(err.statusCode).toEqual(404);
@@ -338,7 +340,7 @@ describe("Proxy Tests", function () {
338340
});
339341

340342
it("Redirect location with rewriting", function (done) {
341-
var proxyPort = 55555;
343+
var proxyPort = 55556;
342344
var options = {
343345
protocolRewrite: "https",
344346
autoRewrite: true,

0 commit comments

Comments
 (0)