Bug 444821 - Re-enable test_storage_statement_executeAsync.js
authorShawn Wilsher <sdwilsh@shawnwilsher.com>
Tue, 15 Jul 2008 11:04:52 -0400
changeset 15951 6db0b5d30af105d5f32c8770b7e74b138aa27df3
parent 15950 e58e7f4c699a71b0a111adda3996ab82475d6208
child 15952 613a1fe1d5f975101b996c261f724fa8b79b3355
push idunknown
push userunknown
push dateunknown
bugs444821
milestone1.9.1a1pre
Bug 444821 - Re-enable test_storage_statement_executeAsync.js This fixes the test to run properly on slower running systems (like the tinderbox machines). r=vlad
storage/test/unit/test_storage_statement_executeAsync.js
--- a/storage/test/unit/test_storage_statement_executeAsync.js
+++ b/storage/test/unit/test_storage_statement_executeAsync.js
@@ -80,16 +80,20 @@ function test_create_table()
       do_check_true(getOpenedDatabase().tableExists("test"));
 
       // Verify that it's created correctly (this will throw if it wasn't)
       var stmt = getOpenedDatabase().createStatement(
         "SELECT id, string, number, nuller, blober FROM test"
       );
       stmt.finalize();
 
+      // Now we run the rest of the tests
+      for (var i = 0; i < tests.length; i++)
+        tests[i]();
+
       do_test_finished();
     }
   });
   stmt.finalize();
 }
 
 function test_add_data()
 {
@@ -441,29 +445,26 @@ function test_double_execute()
   stmt.executeAsync(listener);
   do_test_pending();
   stmt.executeAsync(listener);
   stmt.finalize();
 }
 
 var tests =
 [
-  test_create_table,
   test_add_data,
   test_get_data,
   test_tuple_out_of_bounds,
   test_no_listener_works,
   test_partial_listener_works,
   test_immediate_cancellation,
   test_double_cancellation,
   test_double_execute,
 ];
 
 function run_test()
 {
-  // XXX disabling test due to odd failure on linux
-  // bug 444821
-  return;
   cleanup();
 
-  for (var i = 0; i < tests.length; i++)
-    tests[i]();
+  // This test has to run first and run to completion.  When it is done, it will
+  // run the rest of the tests.
+  test_create_table();
 }