Permalink
Browse files

Fix some of `node-waf list` errors in run-check-tests.js

  • Loading branch information...
1 parent 5ba9d7d commit 4e5f20f46c9f354a53e6cd4965425aa7b47a63b4 @Sannis committed Aug 17, 2010
Showing with 6 additions and 7 deletions.
  1. +6 −7 tests/run-reallyasync-tests.js
@@ -21,7 +21,7 @@ var conn = mysql_libmysqlclient.createConnection(cfg.host, cfg.user, cfg.passwor
last_insert_id,
i;
-var irc = cfg.insert_rows_count
+var irc = cfg.insert_rows_count;
irc = 50;
res = conn.query("DROP TABLE IF EXISTS " + cfg.test_table + ";");
@@ -30,7 +30,7 @@ res = conn.query("CREATE TABLE " + cfg.test_table +
" random_number INT(8) NOT NULL, random_boolean BOOLEAN NOT NULL," +
" PRIMARY KEY (autoincrement_id)) TYPE=MEMORY;");
-if(!res) {
+if (!res) {
sys.puts("conn.query('DELETE FROM cfg.test_table')");
process.exit(1);
}
@@ -43,14 +43,13 @@ for (i = 0; i < irc; i += 1)
random_boolean = (Math.random() > 0.5) ? 1 : 0;
sys.debug("Before queryAsync #" + (i + 1));
- (function(){
+ (function () {
var j = i;
conn.queryAsync("INSERT INTO " + cfg.test_table +
" (random_number, random_boolean) VALUES ('" + random_number +
"', '" + random_boolean + "');", function (result) {
sys.debug("Callback #" + (j + 1));
- //sys.debug("Callback: LastInsertId==" + conn.lastInsertId());
- });
+ });
})();
}
@@ -59,8 +58,8 @@ sys.debug("After 'for' loop");
process.on('exit', function () {
sys.puts("process.exit()");
last_insert_id = conn.lastInsertId();
- if(last_insert_id != irc) {
- sys.debug(last_insert_id + " != " + irc);
+ if (last_insert_id !== irc) {
+ sys.debug(last_insert_id + " !== " + irc);
} else {
sys.debug("last_insert_id == irc");
}

0 comments on commit 4e5f20f

Please sign in to comment.