Skip to content

Commit

Permalink
minor test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher J. Brody committed Oct 11, 2018
1 parent 8b981a9 commit 59f9d31
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions spec/www/spec/db-sql-operations-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ var mytests = function() {
// and finish this test:
db.close(done, done);
});
});
}, MYTIMEOUT);

});

Expand Down Expand Up @@ -1601,7 +1601,7 @@ var mytests = function() {
if (checkCount === expectedCheckCount) db.close(done, done);
});
});
});
}, MYTIMEOUT);

});

Expand Down
7 changes: 4 additions & 3 deletions spec/www/spec/db-tx-error-mapping-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ var mytests = function() {
// TBD skip plugin test on browser platform (not yet supported):
if (isBrowser && (i === 0)) continue;

// GENERAL: SKIP ALL on WP8 for now
describe(scenarioList[i] + ': db tx error mapping test(s)' +
(isWindows ?
' [Windows version with INCORRECT error code (0) & INCONSISTENT error message (missing actual error info)]' :
Expand Down Expand Up @@ -244,8 +243,10 @@ var mytests = function() {
expect(error.message).toMatch(/callback raised an exception.*or.*error callback did not return false/);
else if (isWindows)
expect(error.message).toMatch(/error callback did not return false.*Error preparing an SQLite statement/);
//* else //* XXX TBD
//* expect(error.message).toMatch(/error callback did not return false.*syntax error/);
else if (isAndroid && isImpl2)
expect(error.message).toMatch(/error callback did not return false.*syntax error/);
else
expect(error.message).toMatch(/error callback did not return false.*incomplete input/);

isWebSql ? done() : db.close(done, done);
}, function() {
Expand Down
2 changes: 1 addition & 1 deletion spec/www/spec/db-tx-sql-select-value-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ var mytests = function() {
// - Android version returns result with missing row
it(suiteName + "SELECT ABS(?) with '9e999' (Infinity) parameter argument" +
((!isWebSql && isAndroid) ? ' [Android PLUGIN BROKEN: result with missing row]' : ''), function(done) {
if (!isWebSql && !isAndroid && !isWindows) pending('SKIP for iOS/macOS plugin due to CRASH');
if (!isWebSql && (isAppleMobileOS || isMac)) pending('KNOWN CRASH on iOS/macOS'); // XXX (litehelpers/Cordova-sqlite-storage#405)

var db = openDatabase('SELECT-ABS-Infinite-parameter-results-test.db', '1.0', 'Test', DEFAULT_SIZE);

Expand Down
4 changes: 2 additions & 2 deletions spec/www/spec/db-tx-value-bindings-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ var mytests = function() {
});
}, MYTIMEOUT);

it(suiteName + "INSERT inline BLOB value (X'FFD1FFD2') and check stored data [XXX SKIP FINAL CHECK on default Android NDK access implementation due to CRASH ISSUE; OTHER PLUGIN ISSUES REPRODUCED: missing result column data; SELECT BLOB VALUE ERROR on Android & Windows; missing result column data on iOS/macOS]", function(done) {
it(suiteName + "INSERT inline BLOB value (X'FFD1FFD2') and check stored data [XXX SKIP FINAL SELECT CHECK on default Android NDK access implementation due to CRASH ISSUE; OTHER PLUGIN ISSUES REPRODUCED: missing result column data; SELECT BLOB VALUE ERROR on Android & Windows; missing result column data on iOS/macOS]", function(done) {
var db = openDatabase('INSERT-inline-BLOB-value-FFD1FFD2-and-check-stored-data.db', '1.0', 'Demo', DEFAULT_SIZE);

db.transaction(function(tx) {
Expand Down Expand Up @@ -1593,7 +1593,7 @@ var mytests = function() {
it(suiteName +
' handles UNICODE \\u2028 line separator correctly in database', function (done) {
if (!isWebSql && !isWindows && isAndroid) pending('SKIP for Android plugin (cordova-android 6.x BUG: cordova/cordova-discuss#57)');
if (!isWebSql && !isWindows && !isAndroid) pending('SKIP for iOS/macOS plugin (Cordova BUG: CB-9435)');
if (!isWebSql && (isAppleMobileOS || isMac)) pending('SKIP for iOS/macOS plugin (Cordova BUG: CB-9435)');

var db = openDatabase('UNICODE-line-separator-INSERT-test.db');

Expand Down
2 changes: 1 addition & 1 deletion spec/www/spec/sql-batch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ var mytests = function() {
}, MYTIMEOUT);

it(suiteName + 'sql batch with changing argument value [TBD POSSIBLY INCONSISTENT BEHAVIOR]', function(done) {
var db = openDatabase('sql-batch-with-changing-sql-test.db');
var db = openDatabase('sql-batch-with-changing-argument-value-test.db');

var mybatch = [
'DROP TABLE IF EXISTS MyTable',
Expand Down
6 changes: 3 additions & 3 deletions spec/www/spec/tx-semantics-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ var mytests = function() {
expect(rs4.insertId).toBe(1);
} catch(ex) {
// SHOULD NOT CATCH EXCEPTION on plugin:
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + e.message).toBe('--');
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + ex.message).toBe('--');
expect(ex).toBeDefined();
expect(ex.message).toBeDefined();
// FUTURE TBD check message
Expand All @@ -297,9 +297,9 @@ var mytests = function() {

if (!(isAndroid && isImpl2))
expect(rs5.insertId).toBe(1);
} catch(e) {
} catch(ex) {
// SHOULD NOT CATCH EXCEPTION on plugin:
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin').toBe('--');
if (!isWebSql) expect('EXCEPTION NOT EXPECTED on plugin with message: ' + ex.message).toBe('--');
// XXX TODO CHECK message, etc.
}

Expand Down

0 comments on commit 59f9d31

Please sign in to comment.