Skip to content

Commit ff77c62

Browse files
author
U-MARKLOGIC\ageorge
committed
#559 - Sanity QA test
1 parent 1249b8f commit ff77c62

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test-complete/nodejs-database-connection-negative.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,36 @@ describe('Database connection negative test', function(){
110110
done();
111111
}
112112
});
113+
114+
it('Verify release client error message', function(done){
115+
try {
116+
117+
var db = marklogic.createDatabaseClient({
118+
host: 'localhost',
119+
port: '8015',
120+
user: 'admin',
121+
password: 'admin',
122+
authType: 'DIGEST'
123+
});
124+
// Force connection to be released
125+
db.connectionParams = null
126+
db.documents.query(
127+
q.where(
128+
q.term('describe', q.termOptions('stemmed'))
129+
)).result(function(response) {
130+
done();
131+
}, function(err) {
132+
console.log(JSON.stringify(response, null, 4));
133+
done();
134+
});
135+
done();
136+
} catch(error) {
137+
138+
//console.log('### ' + error.message);
139+
error.message.should.equal('Connection has been closed.');
140+
error.should.be.ok;
141+
done();
142+
}
143+
});
113144

114145
});

0 commit comments

Comments
 (0)