Skip to content

Commit

Permalink
Improve solution to run pulsar-metadata tests since specific providers
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Feb 15, 2025
1 parent 9fb227e commit 5a9542e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
import org.testng.annotations.DataProvider;

public abstract class BaseMetadataStoreTest extends TestRetrySupport {
// to debug specific implementations, set the TEST_METADATA_PROVIDERS environment variable
// or temporarily hard code this value in the test class before running tests in the IDE
// supported values are ZooKeeper,Memory,RocksDB,Etcd,Oxia,MockZooKeeper
private static final String TEST_METADATA_PROVIDERS = System.getenv("TEST_METADATA_PROVIDERS");
private static String originalMetadatastoreProvidersPropertyValue;
protected TestZKServer zks;
protected EtcdCluster etcdCluster;
Expand Down Expand Up @@ -119,8 +123,8 @@ public void cleanup() throws Exception {
@DataProvider(name = "impl")
public Object[][] implementations() {
// If the environment variable TEST_METADATA_PROVIDERS is set, only run the specified implementations
if (StringUtils.isNotBlank(System.getenv("TEST_METADATA_PROVIDERS"))) {
return filterImplementations(System.getenv("TEST_METADATA_PROVIDERS").split(","));
if (StringUtils.isNotBlank(TEST_METADATA_PROVIDERS)) {
return filterImplementations(TEST_METADATA_PROVIDERS.split(","));
}
return allImplementations();
}
Expand Down

0 comments on commit 5a9542e

Please sign in to comment.