Skip to content

Commit

Permalink
[fix][test] Run BlobStoreManagedLedgerOffloader* tests separately and…
Browse files Browse the repository at this point in the history
… reduce memory consumption (apache#19009)
  • Loading branch information
lhotari authored Dec 20, 2022
1 parent 46cacff commit 423bd84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/run_unit_group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ function test_group_other() {
-Dexclude='**/ManagedLedgerTest.java,
**/OffloadersCacheTest.java
**/PrimitiveSchemaTest.java,
BlobStoreManagedLedgerOffloaderTest.java'
**/BlobStoreManagedLedgerOffloaderTest.java,
**/BlobStoreManagedLedgerOffloaderStreamingTest.java'

mvn_test -pl managed-ledger -Dinclude='**/ManagedLedgerTest.java,
**/OffloadersCacheTest.java'

mvn_test -pl tiered-storage/jcloud -Dinclude='**/BlobStoreManagedLedgerOffloaderTest.java'
mvn_test -pl tiered-storage/jcloud -Dinclude='**/BlobStoreManagedLedgerOffloaderStreamingTest.java'

echo "::endgroup::"
local modules_with_quarantined_tests=$(git grep -l '@Test.*"quarantine"' | grep '/src/test/java/' | \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.jclouds.blobstore.BlobStore;
import org.jclouds.domain.Credentials;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;

public abstract class BlobStoreManagedLedgerOffloaderBase {

Expand All @@ -52,6 +53,11 @@ protected BlobStoreManagedLedgerOffloaderBase() throws Exception {
provider = getBlobStoreProvider();
}

@AfterMethod(alwaysRun = true)
public void cleanupMockBookKeeper() {
bk.getLedgerMap().clear();
}

protected static MockManagedLedger createMockManagedLedger() {
return new MockManagedLedger();
}
Expand Down

0 comments on commit 423bd84

Please sign in to comment.