diff options
author | Paul Joseph Davis <davisp@apache.org> | 2009-11-26 00:19:02 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2009-11-26 00:19:02 +0000 |
commit | a320015ab1e34cefdeef9bd151197d80f87b932d (patch) | |
tree | bfdb411ec39b78ea88f076168ecba022aa900142 /share | |
parent | 03ec23ec19c5b1b9b865f26c6680a5327706a6c8 (diff) |
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
Diffstat (limited to 'share')
-rw-r--r-- | share/www/script/test/stats.js | 8 |
1 files changed, 8 insertions, 0 deletions
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)); |