Skip to content

Commit

Permalink
Remove obsolete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 7, 2014
1 parent 60e53cc commit 3be9399
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions test/droonga-protocol/connection-pool.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,71 +177,4 @@ suite('ConnectionPool', function() {
false]);
});
});

suite('communication with the backend', function() {
var connectionPool;

setup(function() {
connectionPool = new ConnectionPool({
hostNames: [
'127.0.0.1'
],
connectionClass: utils.ConnectionStub
});
connectionPool.get().addResult({
version: 2,
datasets: {
main: {
replicas: [
singleVolumeWithHostName('127.0.0.2'),
singleVolumeWithHostName('127.0.0.3')
]
}
}
});
});

teardown(function() {
if (connectionPool) {
connectionPool.closeAll();
connectionPool = undefined;
}
});

test('fetchCatalog', function(done) {
connectionPool.fetchCatalog()
.then(function(catalog) {
assert.deepEqual(catalog.allHostNames,
['127.0.0.2',
'127.0.0.3']);
done();
})
.catch(done);
});

test('getHostNamesFromCatalog', function(done) {
connectionPool.getHostNamesFromCatalog()
.then(function(hostNames) {
assert.deepEqual(hostNames,
['127.0.0.2',
'127.0.0.3']);
done();
})
.catch(done);
});

test('updateHostNamesFromCatalog', function(done) {
connectionPool.updateHostNamesFromCatalog()
.then(function(hostNames) {
assert.deepEqual(hostNames,
['127.0.0.2',
'127.0.0.3']);
assert.deepEqual(connectionPool.hostNames,
['127.0.0.2',
'127.0.0.3']);
done();
})
.catch(done);
});
});
});

0 comments on commit 3be9399

Please sign in to comment.