-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the QTTs now run through SqlFormatter & other formatting fixes (#…
…3222) Co-authored-by: Sergio Peña <sergio@confluent.io>
- Loading branch information
Showing
10 changed files
with
209 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
ksql-functional-tests/src/test/resources/query-validation-tests/ensure-formatter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"comments": [ | ||
"Query Translation tests should make sure that the command that is being executed can be ", | ||
"persisted properly onto the command topic (i.e. serialized using SqlFormatter). Otherwise, ", | ||
"it is possible that we may not execute the same statement after enqueuing as we did before. ", | ||
"This test will fail if we refactor QueryTranslationTest in a way that makes it no longer go ", | ||
"through the SqlFormatInjector, which serializes and then deserializes the statements to make ", | ||
"sure that these inconsistencies are caught.", | ||
"", | ||
"NOTE: This test is a little hacky at the moment because it relies on us not formatting SET ", | ||
"expressions. There is nothing preventing us in the future from doing this, but I don't have ", | ||
"a better way as of now to ensure failure." | ||
], | ||
"tests": [ | ||
{ | ||
"name": "ensure QTTs go through SqlFormatter", | ||
"statements": [ | ||
"CREATE STREAM IGNORED (ID bigint) WITH (kafka_topic='topic', value_format='DELIMITED');", | ||
"SET 'auto.offset.reset'='earliest';" | ||
], | ||
"inputs": [ ], | ||
"outputs": [ ], | ||
"expectedException": { | ||
"type": "io.confluent.ksql.util.KsqlException", | ||
"message": "Unable to format statement!" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.