feat(flink): add performance test
This commit is contained in:
parent
c9d88d00a6
commit
cc1d5abcdd
@ -1,5 +1,5 @@
|
|||||||
import SQLParser from '../../../src/parser/flinksql';
|
import SQLParser from '../../../src/parser/flinksql';
|
||||||
import sqlMockData from '../../mock/sql';
|
import sqlMockData from '../../mock/flinkSql';
|
||||||
|
|
||||||
describe('FlinkSQL Syntax Tests', () => {
|
describe('FlinkSQL Syntax Tests', () => {
|
||||||
const parser = new SQLParser();
|
const parser = new SQLParser();
|
||||||
@ -173,59 +173,50 @@ describe('FlinkSQL Syntax Tests', () => {
|
|||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo 字段中包含特殊字符 如$符号 内容匹配不准确
|
// todo 字段中包含特殊字符 如$符号 内容匹配不准确 自定义字段与与定义的词法规则重复 也会匹配不准确
|
||||||
// test('Test complex sql Statement one', () => {
|
// test('Test complex sql Statement one', () => {
|
||||||
// const sql = sqlMockData.sqlStrOne;
|
// const sql = sqlMockData.sqlStrOne;
|
||||||
// const result = parser.validate(sql);
|
// const result = parser.validate(sql);
|
||||||
// console.log(result);
|
|
||||||
// expect(result.length).toBe(0);
|
// expect(result.length).toBe(0);
|
||||||
// });
|
// });
|
||||||
test('Test complex sql Statement two', () => {
|
test('Test complex sql Statement two', () => {
|
||||||
const sql = sqlMockData.sqlStrTwo;
|
const sql = sqlMockData.sqlStrTwo;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement three', () => {
|
test('Test complex sql Statement three', () => {
|
||||||
const sql = sqlMockData.sqlStrThree;
|
const sql = sqlMockData.sqlStrThree;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement four', () => {
|
test('Test complex sql Statement four', () => {
|
||||||
const sql = sqlMockData.sqlStrFour;
|
const sql = sqlMockData.sqlStrFour;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement five', () => {
|
test('Test complex sql Statement five', () => {
|
||||||
const sql = sqlMockData.sqlStrFive;
|
const sql = sqlMockData.sqlStrFive;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement six', () => {
|
test('Test complex sql Statement six', () => {
|
||||||
const sql = sqlMockData.sqlStrSix;
|
const sql = sqlMockData.sqlStrSix;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement seven', () => {
|
test('Test complex sql Statement seven', () => {
|
||||||
const sql = sqlMockData.sqlStrSeven;
|
const sql = sqlMockData.sqlStrSeven;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
test('Test complex sql Statement eight', () => {
|
test('Test complex sql Statement eight', () => {
|
||||||
const sql = sqlMockData.sqlStrEight;
|
const sql = sqlMockData.sqlStrEight;
|
||||||
const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
console.log(result);
|
|
||||||
expect(result.length).toBe(0);
|
expect(result.length).toBe(0);
|
||||||
});
|
});
|
||||||
// test('Test complex sql Statement nine', () => {
|
test('Test complex sql Statement nine', () => {
|
||||||
// const sql = sqlMockData.allSqlStr;
|
const sql = sqlMockData.allSqlStr;
|
||||||
// const result = parser.validate(sql);
|
const result = parser.validate(sql);
|
||||||
// console.log(result);
|
expect(result.length).toBe(0);
|
||||||
// expect(result.length).toBe(0);
|
});
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user