funky-eyes commented on code in PR #7580: URL: https://github.com/apache/incubator-seata/pull/7580#discussion_r2268351069
########## server/src/test/java/org/apache/seata/server/DynamicPortTestConfig.java: ########## Review Comment: > Or how about creating and applying a custom annotation like the one below?' Then, We can just add single annotation > > ```java > @Target(ElementType.TYPE) > @Retention(RetentionPolicy.RUNTIME) > @TestPropertySource(properties = {"server.port=${random.int[10000,20000]}"}) > public @interface RandomPortTest { > } > ``` I tried this approach, but `TestPropertySource` simply doesn’t take effect unless the annotation is placed directly on the actual test class. Otherwise, it won’t work if it’s applied through the `RandomPortTest` annotation. -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org