Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid query test #2016

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions system-test/spanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6655,9 +6655,9 @@
await postgreSqlTable.insert(data);
}
});

Check warning on line 6658 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

'rows' is defined but never used
// all of these tests require testing with and without an index,
// to cut back on duplication, the core sections of the tests have been

Check failure on line 6660 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`

Check failure on line 6660 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// turned into configurations
[
{
Expand All @@ -6667,9 +6667,9 @@
{
startClosed: 'k99',
endOpen: 'z',
},

Check warning on line 6670 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

'rows' is defined but never used
],
columns: ALL_COLUMNS,

Check failure on line 6672 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`

Check failure on line 6672 in system-test/spanner.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
},
assertions(err, rows) {
assert.ifError(err);
Expand Down Expand Up @@ -6999,6 +6999,27 @@
readInvalidColumn(done, postgreSqlTable);
});

it('GOOGLE_STANDARD_SQL should execute over invalid query fails', done => {
console.time('invalid query GOOGLE_STANDARD_SQL');
DATABASE.run('SELECT aaa', (err, rows) => {
assert.strictEqual(err?.code, 3);
done();
});
console.timeEnd('invalid query GOOGLE_STANDARD_SQL');
});

it('POSTGRESQL should execute over invalid query fails', function (done) {
if (IS_EMULATOR_ENABLED) {
this.skip();
}
console.time('invalid query POSTGRESQL');
PG_DATABASE.run('SELECT aaa', (err, rows) => {
assert.strictEqual(err?.code, 3);
done();
});
console.timeEnd('invalid query POSTGRESQL');
});

const failDeadlineExceed = (done, table) => {
const query = {
keys: ['k1'],
Expand Down
Loading