Add random name suffix to SQL Server test tables#28506
Conversation
chenjian2664
left a comment
There was a problem hiding this comment.
we seems not run the test concurrently? It's better to share the logs of the failure test
| */ | ||
| private static String addNameSuffix(String name) | ||
| { | ||
| return name.replaceFirst("(\\s*)$", randomNameSuffix() + "$1"); |
There was a problem hiding this comment.
It's hard to read the test about the table name, does the fix of testTableNameTestData works ?
There was a problem hiding this comment.
Another approach is to use AbstractTestQueryFramework#executeExclusively method. It still has a shared problem - a failure may affect other tests since the relevant test don't have finally block to drop tables.
Or just changing the prefix in each test likes #28508 might be sufficient.
There was a problem hiding this comment.
I believe those randomized suffixes are good enough.
True, we can move drop to finally, and iirc synapse does not support "IF EXIST" in drop statement
There was a problem hiding this comment.
@LBPeraza is adding randomized suffix connected with running concurrently profiles|suites: weekly and nightly?
|
@chenjian2664 It runs concurrently since AbstractTestQueryFramework has |
|
@ebyhr Thanks for the explanation |
|
There are 3 usages of testTableNameTestData, and each test has a different prefix:
I'm not sure where the conflict is occurring. TestSqlServerConnectorTest vs BaseConnectorTest? |
I've added a failure stack trace to the PR description.
|
2e05751 to
c46f2b8
Compare
Multiple test functions create tables with names from testTableNameTestData, which can cause flaky failures when running them concurrently. Adding these random suffixes should make sure the table names never collide.
c46f2b8 to
6963ffd
Compare
Description
Multiple test functions create tables with names from testTableNameTestData, which can cause flaky failures when running them concurrently. Adding these random suffixes should make sure the table names never collide.
Example stack trace:
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: