mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
add test file
This commit is contained in:
@@ -212,6 +212,26 @@ public class PlainPermissionManagerTest {
|
||||
// RemoveDataVersionFromYamlFile("src/test/resources/conf/plain_acl.yml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiFilePathTest() {
|
||||
File file = new File("src/test/resources");
|
||||
System.setProperty("rocketmq.home.dir", file.getAbsolutePath());
|
||||
|
||||
PlainPermissionManager plainPermissionManager = new PlainPermissionManager();
|
||||
|
||||
String samefilePath = file.getAbsolutePath()+"/conf/acl/.";
|
||||
String samefilePath2 = "/" +file.getAbsolutePath()+"/conf/acl";
|
||||
|
||||
int size = plainPermissionManager.getDataVersionMap().size();
|
||||
|
||||
plainPermissionManager.load(samefilePath);
|
||||
Assert.assertEquals(size, plainPermissionManager.getDataVersionMap().size());
|
||||
|
||||
plainPermissionManager.load(samefilePath2);
|
||||
Assert.assertEquals(size, plainPermissionManager.getDataVersionMap().size());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWatch() throws IOException, IllegalAccessException, InterruptedException {
|
||||
File file = new File("src/test/resources");
|
||||
|
||||
Reference in New Issue
Block a user