tisonkun opened a new issue, #16694:
URL: https://github.com/apache/pulsar/issues/16694

   It's because:
   
   ```java
       public final static String BROKER_KEYSTORE_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/broker.keystore.jks").getPath();
       public final static String BROKER_TRUSTSTORE_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/broker.truststore.jks").getPath();
       public final static String BROKER_TRUSTSTORE_NO_PASSWORD_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/broker.truststore.nopassword.jks").getPath();
       public final static String CLIENT_KEYSTORE_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/client.keystore.jks").getPath();
       public final static String CLIENT_TRUSTSTORE_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/client.truststore.jks").getPath();
       public final static String CLIENT_TRUSTSTORE_NO_PASSWORD_FILE_PATH =
               
Resources.getResource("certificate-authority/jks/client.truststore.nopassword.jks").getPath();
   ```
   
   ... these resources files are under `tests` folder. So if you run a unit 
test inherited from `MockedPulsarServiceBaseTest` from IDEA, test will fail 
with:
   
   ```
   Caused by: java.lang.IllegalArgumentException: resource 
certificate-authority/jks/broker.keystore.jks not found.
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
        at com.google.common.io.Resources.getResource(Resources.java:198)
        at 
org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest.<clinit>(MockedPulsarServiceBaseTest.java:86)
        ... 29 more
   ```
   
   Currently, I must set those field as `null` to run a unit test locally. 
Thus, I have two questions here:
   
   1. How can we run tests normally in the CI environment?
   2. Can we improve testing settings to run unit test smoothly?


-- 
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]

Reply via email to