[nodejs-sqlite3] Fix tests to work with rawhide version of sqlite

Tom Hughes tomh at fedoraproject.org
Tue Mar 5 11:13:14 UTC 2013


commit 8cae56ee1be12663fe785cd80611404a33312024
Author: Tom Hughes <tom at compton.nu>
Date:   Tue Mar 5 11:12:28 2013 +0000

    Fix tests to work with rawhide version of sqlite

 nodejs-sqlite3-tests.patch |   25 +++++++++++++++++++++++++
 nodejs-sqlite3.spec        |    5 ++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/nodejs-sqlite3-tests.patch b/nodejs-sqlite3-tests.patch
new file mode 100644
index 0000000..c166411
--- /dev/null
+++ b/nodejs-sqlite3-tests.patch
@@ -0,0 +1,25 @@
+diff --git a/test/scheduling.test.js b/test/scheduling.test.js
+index d28d2be..7947826 100644
+--- a/test/scheduling.test.js
++++ b/test/scheduling.test.js
+@@ -30,7 +30,7 @@ exports['test scheduling a query with callback after the database was closed'] =
+ 
+     db.close();
+     db.run("CREATE TABLE foo (id int)", function(err) {
+-        assert.ok(err.message, "SQLITE_MISUSE: Database handle is closed");
++        assert.equal(err.message, "SQLITE_MISUSE: Database handle is closed");
+         error = true;
+     });
+ 
+@@ -49,7 +49,10 @@ exports['test running a query after the database was closed'] = function(beforeE
+         db.close(function(err) {
+             assert.ok(err);
+             error = true;
+-            assert.equal(err.message, "SQLITE_BUSY: unable to close due to unfinalised statements");
++            assert.ok(
++              err.message == "SQLITE_BUSY: unable to close due to unfinalised statements" ||
++              err.message == "SQLITE_BUSY: unable to close due to unfinalized statements or unfinished backups"
++            );
+             stmt.run();
+         });
+     });
diff --git a/nodejs-sqlite3.spec b/nodejs-sqlite3.spec
index 0a04294..4434981 100644
--- a/nodejs-sqlite3.spec
+++ b/nodejs-sqlite3.spec
@@ -16,8 +16,10 @@ Patch1:         nodejs-sqlite3-paths.patch
 Patch2:         nodejs-sqlite3-async.patch
 # Will offer upstream when node 0.10 is released
 Patch3:         nodejs-sqlite3-uv.patch
-# Will discuss with upstream
+# Offered upstream - https://github.com/developmentseed/node-sqlite3/pull/121
 Patch4:         nodejs-sqlite3-callbacks.patch
+# Offered upstream - https://github.com/developmentseed/node-sqlite3/pull/122
+Patch5:         nodejs-sqlite3-tests.patch
 
 BuildRequires:  nodejs-devel
 BuildRequires:  node-gyp
@@ -39,6 +41,7 @@ BuildRequires:  npm(step)
 %patch2 -p1 -b .async
 %patch3 -p1 -b .uv
 %patch4 -p1 -b .callbacks
+%patch5 -p1 -b .tests
 rm -rf deps node_modules
 
 


More information about the scm-commits mailing list