@@ -38,38 +38,31 @@ protected PermissionTestUtils getPermissionTestUtils(String testName) {
3838
3939 @ Override
4040 protected void waitForTableCreation () {
41- if (JdbcTestUtils .isYugabyte (rdbEngine )) {
42- // This is needed to avoid schema or catalog version mismatch database errors.
43- Uninterruptibles .sleepUninterruptibly (DDL_WAIT_SECONDS , TimeUnit .SECONDS );
44- }
41+ waitForDdlCompletion ();
4542 }
4643
4744 @ Override
4845 protected void waitForNamespaceCreation () {
49- if (JdbcTestUtils .isYugabyte (rdbEngine )) {
50- // This is needed to avoid schema or catalog version mismatch database errors.
51- Uninterruptibles .sleepUninterruptibly (DDL_WAIT_SECONDS , TimeUnit .SECONDS );
52- }
46+ waitForDdlCompletion ();
5347 }
5448
5549 @ Override
5650 protected void waitForTableDeletion () {
57- if (JdbcTestUtils .isYugabyte (rdbEngine )) {
58- // This is needed to avoid schema or catalog version mismatch database errors.
59- Uninterruptibles .sleepUninterruptibly (DDL_WAIT_SECONDS , TimeUnit .SECONDS );
60- }
51+ waitForDdlCompletion ();
6152 }
6253
6354 @ Override
6455 protected void waitForNamespaceDeletion () {
65- if (JdbcTestUtils .isYugabyte (rdbEngine )) {
66- // This is needed to avoid schema or catalog version mismatch database errors.
67- Uninterruptibles .sleepUninterruptibly (DDL_WAIT_SECONDS , TimeUnit .SECONDS );
68- }
56+ waitForDdlCompletion ();
6957 }
7058
7159 @ Override
7260 protected void sleepBetweenTests () {
61+ // Sleep to ensure the DDL operations executed as ACT are completed before the next setup.
62+ waitForDdlCompletion ();
63+ }
64+
65+ private void waitForDdlCompletion () {
7366 if (JdbcTestUtils .isYugabyte (rdbEngine )) {
7467 // This is needed to avoid schema or catalog version mismatch database errors.
7568 Uninterruptibles .sleepUninterruptibly (DDL_WAIT_SECONDS , TimeUnit .SECONDS );
0 commit comments