Skip to content

Commit d971283

Browse files
committed
Fix issues with chrome sandbox and proxy unavailable port
1 parent e1f0162 commit d971283

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/Client.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ describe('Client code', () => {
4242
describe('behind a proxy', () => {
4343
let proxy;
4444

45-
jest.setTimeout(20000);
45+
jest.setTimeout(30000);
4646

4747
beforeAll(() => {
48-
proxy = startProxy(9000);
48+
proxy = startProxy(9050);
4949
});
5050

5151
afterAll(() => {
5252
proxy.close();
5353
});
5454

5555
it('responds with a 200', (done) => {
56-
const req = request('http://localhost:9000');
56+
const req = request('http://localhost:9050');
5757
req.get('/sockjs-node').expect(200, 'Welcome to SockJS!\n', done);
5858
});
5959

@@ -63,12 +63,12 @@ describe('Client code', () => {
6363
.waitForRequest((requestObj) => requestObj.url().match(/sockjs-node/))
6464
.then((requestObj) => {
6565
expect(requestObj.url()).toMatch(
66-
/^http:\/\/localhost:9000\/sockjs-node/
66+
/^http:\/\/localhost:9050\/sockjs-node/
6767
);
6868
browser.close();
6969
done();
7070
});
71-
page.goto('http://localhost:9000/main');
71+
page.goto('http://localhost:9050/main');
7272
});
7373
});
7474
});

test/helpers/run-browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function runBrowser(config) {
1919
puppeteer
2020
.launch({
2121
headless: true,
22+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
2223
})
2324
.then((launchedBrowser) => {
2425
browser = launchedBrowser;

0 commit comments

Comments
 (0)