Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions bin/down-server.js

This file was deleted.

6 changes: 0 additions & 6 deletions bin/test-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions tests/integration/test.replication.js
Original file line number Diff line number Diff line change
Expand Up @@ -4196,6 +4196,8 @@ adapters.forEach(function (adapters) {
// This test only needs to run for one configuration, and it slows stuff
// down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But... it's currently run for quite a few configurations. And behaves very differently with different configurations. Perhaps this comment should be updated.

describe('suite2 test.replication.js-down-test', function () {
this.timeout(360000);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weirdly this is necessary, despite the 10ms timeouts set below. Maybe a bug?


let dbs = {};

beforeEach(function (done) {
Expand All @@ -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/);
}
});
});
Expand Down
Loading