Skip to content

Commit c691ed1

Browse files
committed
disable auto compaction
1 parent 6b847ce commit c691ed1

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

catalogs/catalog-jdbc-doris/src/test/java/com/datastrato/gravitino/catalog/doris/integration/test/CatalogDorisIT.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class CatalogDorisIT extends AbstractIT {
7979
// Because the creation of Schema Change is an asynchronous process, we need to wait for a while
8080
// For more information, you can refer to the comment in
8181
// DorisTableOperations.generateAlterTableSql().
82-
private static final long MAX_WAIT_IN_SECONDS = 30;
82+
private static final long MAX_WAIT_IN_SECONDS = 10;
8383

8484
private static final long WAIT_INTERVAL_IN_SECONDS = 1;
8585

@@ -192,6 +192,8 @@ private Column[] createColumns() {
192192
private Map<String, String> createTableProperties() {
193193
Map<String, String> properties = Maps.newHashMap();
194194
properties.put("replication_allocation", "tag.location.default: 1");
195+
properties.put("disable_auto_compaction", "true");
196+
195197
return properties;
196198
}
197199

catalogs/catalog-jdbc-doris/src/test/java/com/datastrato/gravitino/catalog/doris/integration/test/DorisTableOperationsIT.java

+17-15
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public class DorisTableOperationsIT extends TestDorisAbstractIT {
4040

4141
private static final String databaseName = GravitinoITUtils.genRandomName("doris_test_db");
4242

43-
// Because the creation of Schema Change is an asynchronous process, we need wait for a while
43+
// Because the creation of Schema Change is an asynchronous process, we need to wait for a while
4444
// For more information, you can refer to the comment in
4545
// DorisTableOperations.generateAlterTableSql().
46-
private static final long MAX_WAIT = 30;
46+
private static final long MAX_WAIT_IN_SECONDS = 10;
4747

48-
private static final long WAIT_INTERVAL = 1;
48+
private static final long WAIT_INTERVAL_IN_SECONDS = 1;
4949

5050
@BeforeAll
5151
public static void startup() {
@@ -60,6 +60,8 @@ private static void createDatabase() {
6060
private static Map<String, String> createProperties() {
6161
Map<String, String> properties = Maps.newHashMap();
6262
properties.put("replication_allocation", "tag.location.default: 1");
63+
properties.put("disable_auto_compaction", "true");
64+
6365
return properties;
6466
}
6567

@@ -162,8 +164,8 @@ public void testAlterTable() {
162164
columns.add(col_3);
163165

164166
Awaitility.await()
165-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
166-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
167+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
168+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
167169
.untilAsserted(
168170
() ->
169171
assertionsTableInfo(
@@ -209,8 +211,8 @@ public void testAlterTable() {
209211
columns.add(col_3);
210212
columns.add(col_4);
211213
Awaitility.await()
212-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
213-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
214+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
215+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
214216
.untilAsserted(
215217
() ->
216218
assertionsTableInfo(
@@ -234,8 +236,8 @@ public void testAlterTable() {
234236
columns.add(col_4);
235237
columns.add(col_3);
236238
Awaitility.await()
237-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
238-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
239+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
240+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
239241
.untilAsserted(
240242
() ->
241243
assertionsTableInfo(
@@ -254,8 +256,8 @@ public void testAlterTable() {
254256
columns.add(col_2);
255257
columns.add(col_3);
256258
Awaitility.await()
257-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
258-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
259+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
260+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
259261
.untilAsserted(
260262
() ->
261263
assertionsTableInfo(
@@ -293,8 +295,8 @@ public void testAlterTable() {
293295
Index[] newIndexes =
294296
new Index[] {Indexes.primary("k2_index", new String[][] {{"col_2"}, {"col_3"}})};
295297
Awaitility.await()
296-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
297-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
298+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
299+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
298300
.untilAsserted(
299301
() ->
300302
assertionsTableInfo(
@@ -309,8 +311,8 @@ public void testAlterTable() {
309311
TABLE_OPERATIONS.alterTable(databaseName, tableName, TableChange.deleteIndex("k2_index", true));
310312

311313
Awaitility.await()
312-
.atMost(MAX_WAIT, TimeUnit.SECONDS)
313-
.pollInterval(WAIT_INTERVAL, TimeUnit.SECONDS)
314+
.atMost(MAX_WAIT_IN_SECONDS, TimeUnit.SECONDS)
315+
.pollInterval(WAIT_INTERVAL_IN_SECONDS, TimeUnit.SECONDS)
314316
.untilAsserted(
315317
() ->
316318
assertionsTableInfo(

0 commit comments

Comments
 (0)