lifepuzzlefun commented on code in PR #19793:
URL: https://github.com/apache/pulsar/pull/19793#discussion_r1134943922
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStoreConfig.java:
##########
@@ -81,6 +84,39 @@ public class MetadataStoreConfig {
@Builder.Default
private final String metadataStoreName = "";
+ public static MetadataStoreConfigBuilder builder() {
+ return new CustomMetadataStoreConfigBuilder();
+ }
+
+ public static class CustomMetadataStoreConfigBuilder extends
MetadataStoreConfigBuilder {
+
+ private String callerSetMetadataStoreName;
+
+ @Override
+ public MetadataStoreConfigBuilder metadataStoreName(String
metadataStoreName) {
+ this.callerSetMetadataStoreName = metadataStoreName;
+ return super.metadataStoreName(metadataStoreName);
+ }
+
+ @Override
+ public MetadataStoreConfig build() {
+ if (Strings.isEmpty(this.callerSetMetadataStoreName)) {
+ Exception e = new Exception("stack trace");
Review Comment:
I agree with you. the problem is there is a lot of ut didn't set name. If
they don't set name but they close the object the flaky test won't occur.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]