From a320015ab1e34cefdeef9bd151197d80f87b932d Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Thu, 26 Nov 2009 00:19:02 +0000 Subject: Update the open db's test to check failure. Damien made a good point that we should check that the error is generated as expected before waiting as necessary for the active db's to go idle. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@884344 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/stats.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share') diff --git a/share/www/script/test/stats.js b/share/www/script/test/stats.js index 6e37e741..7c32fdff 100644 --- a/share/www/script/test/stats.js +++ b/share/www/script/test/stats.js @@ -88,6 +88,14 @@ couchTests.stats = function(debug) { var times = []; for(var i = 0; i < max*2; i++) { if(i >= max) { + if(i == max) { + try { + newDb("test_suite_db_" + i, true); + T(0 === 1, "Should have failed to create max+1 db's quickly."); + } catch(e) { + T(e.reason == "all_dbs_active", "All db's should be active."); + } + } var msecs = (new Date()).getTime() - times[i-max]; if(msecs < 1000) { CouchDB.request("GET", "/_sleep?time=" + (msecs+250)); -- cgit v1.2.3