Skip to content

Commit

Permalink
Fix known issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanziwei committed Jan 5, 2024
1 parent 8f7338e commit cf674f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ public void testCopy() {
assertEquals(conf, copied);
assertNotSame(conf, copied);
assertEquals(copied.size(), 3);
assertEquals("localhost:8081,localhost:8082,localhost:8083,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}",
assertEquals(
"localhost:8081,localhost:8082,localhost:8083,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}",
copied.toString());

final PeerId newPeer = new PeerId("localhost", 8084);
Expand Down Expand Up @@ -172,6 +173,7 @@ public void testDiff() {
final Configuration excluded = new Configuration();
conf1.diff(conf2, included, excluded);
assertEquals("localhost:8082,enableFlexible:false,readFactor:0,writeFactor:0", included.toString());
assertEquals("localhost:8085,localhost:8086,enableFlexible:false,readFactor:0,writeFactor:0", excluded.toString());
assertEquals("localhost:8085,localhost:8086,enableFlexible:false,readFactor:0,writeFactor:0",
excluded.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@ public void testLoadWithConfigManager() {
assertNotNull(conf);
System.out.println("conf:" + conf);
assertFalse(conf.isEmpty());
assertEquals("localhost:8081,localhost:8082,localhost:8083,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}",
assertEquals(
"localhost:8081,localhost:8082,localhost:8083,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}",
conf.getConf().toString());
conf = this.confManager.get(99);
assertNotNull(conf);
assertFalse(conf.isEmpty());
assertEquals("localhost:8081,localhost:8082,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}", conf.getConf()
.toString());
assertEquals(
"localhost:8081,localhost:8082,enableFlexible:false,readFactor:0,writeFactor:0,quorum:Quorum{w=2, r=2}",
conf.getConf().toString());
}

@Test
Expand Down

0 comments on commit cf674f1

Please sign in to comment.