Skip to content

Commit eb2790e

Browse files
committed
Add wait to integration test cases
1 parent b48fb1e commit eb2790e

18 files changed

+119
-12
lines changed

.github/workflows/object-storage-adapter-check.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,6 @@ jobs:
144144
fail-fast: false
145145
matrix:
146146
test_group:
147-
- label: consensus_commit_default
148-
tests_filter: '--tests "**.ConsensusCommit**"'
149-
bucket_suffix: consensus-commit
150-
group_commit_enabled: false
151-
- label: consensus_commit_with_group_commit
152-
tests_filter: '--tests "**.ConsensusCommit**"'
153-
bucket_suffix: consensus-commit-gc
154-
group_commit_enabled: true
155147
- label: storage_scan
156148
tests_filter: '--tests "**.ObjectStorageSingle**" --tests "**.ObjectStorageMultiple**"'
157149
bucket_suffix: storage-scan
@@ -172,10 +164,6 @@ jobs:
172164
tests_filter: '--tests "**.ObjectStorage**" --tests "*!ObjectStorageSingle" --tests "*!ObjectStorageMultiple" --tests "*!ObjectStorageWrapper" --tests "*!ObjectStorageAdmin" --tests "*!ObjectStorageConditionalMutation"'
173165
bucket_suffix: storage
174166
group_commit_enabled: false
175-
- label: two_phase_consensus_commit
176-
tests_filter: '--tests "**.TwoPhaseConsensusCommit**"'
177-
bucket_suffix: 2pcc
178-
group_commit_enabled: false
179167
- label: single_crud_operation_transaction
180168
tests_filter: '--tests "**.SingleCrudOperationTransaction**"'
181169
bucket_suffix: single-crud

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageAdminRepairIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageAdminRepairIntegrationTestBase;
45
import com.scalar.db.api.Scan;
56
import com.scalar.db.api.TableMetadata;
67
import com.scalar.db.io.DataType;
78
import java.util.Properties;
9+
import java.util.concurrent.TimeUnit;
810
import org.junit.jupiter.api.Disabled;
911

1012
public class ObjectStorageAdminRepairIntegrationTest
@@ -35,6 +37,13 @@ protected TableMetadata getTableMetadata() {
3537
.build();
3638
}
3739

40+
@Override
41+
protected void waitToAvoidRateLimiting() {
42+
if (ObjectStorageEnv.isCloudStorage()) {
43+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
44+
}
45+
}
46+
3847
@Override
3948
protected Properties getProperties(String testName) {
4049
return ObjectStorageEnv.getProperties(testName);

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageCaseSensitivityIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageCaseSensitivityIntegrationTestBase;
45
import com.scalar.db.api.TableMetadata;
56
import com.scalar.db.io.DataType;
67
import java.util.Map;
78
import java.util.Properties;
9+
import java.util.concurrent.TimeUnit;
810
import org.junit.jupiter.api.Disabled;
911

1012
public class ObjectStorageCaseSensitivityIntegrationTest
@@ -24,6 +26,13 @@ protected TableMetadata getTableMetadata() {
2426
.build();
2527
}
2628

29+
@Override
30+
protected void waitToAvoidRateLimiting() {
31+
if (ObjectStorageEnv.isCloudStorage()) {
32+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
33+
}
34+
}
35+
2736
@Override
2837
protected Properties getProperties(String testName) {
2938
return ObjectStorageEnv.getProperties(testName);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageColumnValueIntegrationTestBase;
45
import java.util.Properties;
6+
import java.util.concurrent.TimeUnit;
57

68
public class ObjectStorageColumnValueIntegrationTest
79
extends DistributedStorageColumnValueIntegrationTestBase {
10+
811
@Override
912
protected Properties getProperties(String testName) {
1013
return ObjectStorageEnv.getProperties(testName);
1114
}
15+
16+
@Override
17+
protected void waitToAvoidRateLimiting() {
18+
if (ObjectStorageEnv.isCloudStorage()) {
19+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
20+
}
21+
}
1222
}

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageConditionalMutationIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageConditionalMutationIntegrationTestBase;
45
import java.util.Properties;
6+
import java.util.concurrent.TimeUnit;
57

68
public class ObjectStorageConditionalMutationIntegrationTest
79
extends DistributedStorageConditionalMutationIntegrationTestBase {
@@ -15,4 +17,11 @@ protected int getThreadNum() {
1517
protected Properties getProperties(String testName) {
1618
return ObjectStorageEnv.getProperties(testName);
1719
}
20+
21+
@Override
22+
protected void waitToAvoidRateLimiting() {
23+
if (ObjectStorageEnv.isCloudStorage()) {
24+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
25+
}
26+
}
1827
}

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageIntegrationTestBase;
45
import com.scalar.db.api.TableMetadata;
56
import com.scalar.db.io.DataType;
67
import java.util.Map;
78
import java.util.Properties;
9+
import java.util.concurrent.TimeUnit;
810
import org.junit.jupiter.api.Disabled;
911

1012
public class ObjectStorageIntegrationTest extends DistributedStorageIntegrationTestBase {
@@ -23,6 +25,13 @@ protected TableMetadata getTableMetadata() {
2325
.build();
2426
}
2527

28+
@Override
29+
protected void waitToAvoidRateLimiting() {
30+
if (ObjectStorageEnv.isCloudStorage()) {
31+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
32+
}
33+
}
34+
2635
@Override
2736
protected Properties getProperties(String testName) {
2837
return ObjectStorageEnv.getProperties(testName);

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageJapaneseIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageJapaneseIntegrationTestBase;
45
import java.util.Properties;
6+
import java.util.concurrent.TimeUnit;
57

68
public class ObjectStorageJapaneseIntegrationTest
79
extends DistributedStorageJapaneseIntegrationTestBase {
@@ -10,4 +12,11 @@ public class ObjectStorageJapaneseIntegrationTest
1012
protected Properties getProperties(String testName) {
1113
return ObjectStorageEnv.getProperties(testName);
1214
}
15+
16+
@Override
17+
protected void waitToAvoidRateLimiting() {
18+
if (ObjectStorageEnv.isCloudStorage()) {
19+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
20+
}
21+
}
1322
}

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageMutationAtomicityUnitIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageMutationAtomicityUnitIntegrationTestBase;
45
import java.util.Map;
56
import java.util.Properties;
7+
import java.util.concurrent.TimeUnit;
68

79
public class ObjectStorageMutationAtomicityUnitIntegrationTest
810
extends DistributedStorageMutationAtomicityUnitIntegrationTestBase {
@@ -16,4 +18,11 @@ protected Properties getProperties(String testName) {
1618
protected Map<String, String> getCreationOptions() {
1719
return ObjectStorageEnv.getCreationOptions();
1820
}
21+
22+
@Override
23+
protected void waitToAvoidRateLimiting() {
24+
if (ObjectStorageEnv.isCloudStorage()) {
25+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
26+
}
27+
}
1928
}

core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageWithReservedKeywordIntegrationTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.DistributedStorageWithReservedKeywordIntegrationTestBase;
45
import com.scalar.db.api.TableMetadata;
56
import com.scalar.db.io.DataType;
67
import java.util.Map;
78
import java.util.Properties;
9+
import java.util.concurrent.TimeUnit;
810
import org.junit.jupiter.api.Disabled;
911

1012
public class ObjectStorageWithReservedKeywordIntegrationTest
@@ -24,6 +26,13 @@ protected TableMetadata getTableMetadata() {
2426
.build();
2527
}
2628

29+
@Override
30+
protected void waitToAvoidRateLimiting() {
31+
if (ObjectStorageEnv.isCloudStorage()) {
32+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
33+
}
34+
}
35+
2736
@Override
2837
protected Properties getProperties(String testName) {
2938
return ObjectStorageEnv.getProperties(testName);

core/src/integration-test/java/com/scalar/db/storage/objectstorage/SingleCrudOperationTransactionIntegrationTestWithObjectStorage.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
package com.scalar.db.storage.objectstorage;
22

3+
import com.google.common.util.concurrent.Uninterruptibles;
34
import com.scalar.db.api.TableMetadata;
45
import com.scalar.db.io.DataType;
56
import com.scalar.db.transaction.singlecrudoperation.SingleCrudOperationTransactionIntegrationTestBase;
67
import java.util.Properties;
8+
import java.util.concurrent.TimeUnit;
79

810
public class SingleCrudOperationTransactionIntegrationTestWithObjectStorage
911
extends SingleCrudOperationTransactionIntegrationTestBase {
1012

13+
@Override
14+
protected void waitToAvoidRateLimiting() {
15+
if (ObjectStorageEnv.isCloudStorage()) {
16+
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
17+
}
18+
}
19+
1120
@Override
1221
protected TableMetadata getTableMetadata() {
1322
return TableMetadata.newBuilder()

0 commit comments

Comments
 (0)