diff --git a/bin/down-server.js b/bin/down-server.js deleted file mode 100644 index 7e5c79d01f..0000000000 --- a/bin/down-server.js +++ /dev/null @@ -1,12 +0,0 @@ -const http = require('http'); - -const [port] = process.argv.slice(2); - -const server = http.createServer((request, response) => { - response.writeHead(500, { 'Content-Type': 'application/json' }); - response.end('{}'); -}); - -server.listen(port, () => { - console.log(`Down server listening on port ${port}`); -}); diff --git a/bin/test-node.sh b/bin/test-node.sh index a40848807a..74038d243d 100755 --- a/bin/test-node.sh +++ b/bin/test-node.sh @@ -12,12 +12,6 @@ else fi if [ "$TYPE" = "integration" ]; then - if (: < /dev/tcp/127.0.0.1/3010) 2>/dev/null; then - echo "down-server port already in use" - else - node bin/down-server.js 3010 & export DOWN_SERVER_PID=$! - fi - TESTS_PATH="tests/integration/test.*.js" fi if [ "$TYPE" = "fuzzy" ]; then diff --git a/tests/integration/test.replication.js b/tests/integration/test.replication.js index 75b9684796..99474613fd 100644 --- a/tests/integration/test.replication.js +++ b/tests/integration/test.replication.js @@ -4196,6 +4196,8 @@ adapters.forEach(function (adapters) { // This test only needs to run for one configuration, and it slows stuff // down describe('suite2 test.replication.js-down-test', function () { + this.timeout(360000); + let dbs = {}; beforeEach(function (done) { @@ -4208,14 +4210,15 @@ describe('suite2 test.replication.js-down-test', function () { }); it('replicate from down server test', async () => { - const source = new PouchDB('http://127.0.0.1:3010', { - ajax: {timeout: 10} + const source = new PouchDB('http://10.1.1.1:1234/store', { + ajax: {timeout: 10}, + timeout: 10, }); const target = new PouchDB(dbs.name); try { await source.replicate.to(target); } catch (error) { - should.exist(error); + error.message.should.match(/(^(Failed to fetch|NetworkError when attempting to fetch resource\.|Load failed)$)|ECONNREFUSED|EHOSTUNREACH|ETIMEDOUT/); } }); });