sijie closed pull request #1119: Use BookieServer#getLocalAddress() in 
BookieClientTest
URL: https://github.com/apache/bookkeeper/pull/1119
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
index 2abf020d0..1e0750f17 100644
--- 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
+++ 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
@@ -69,7 +69,6 @@
     public EventLoopGroup eventLoopGroup;
     public OrderedSafeExecutor executor;
     private ScheduledExecutorService scheduler;
-    ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
 
     @Before
     public void setUp() throws Exception {
@@ -152,7 +151,7 @@ public void testWriteGaps() throws Exception {
         final Object notifyObject = new Object();
         byte[] passwd = new byte[20];
         Arrays.fill(passwd, (byte) 'a');
-        BookieSocketAddress addr = new BookieSocketAddress("127.0.0.1", port);
+        BookieSocketAddress addr = bs.getLocalAddress();
         ResultStruct arc = new ResultStruct();
 
         BookieClient bc = new BookieClient(new ClientConfiguration(), 
eventLoopGroup, executor,
@@ -255,7 +254,7 @@ private ByteBuf createByteBuffer(int i, long lid, long eid) 
{
     @Test
     public void testNoLedger() throws Exception {
         ResultStruct arc = new ResultStruct();
-        BookieSocketAddress addr = new BookieSocketAddress("127.0.0.1", port);
+        BookieSocketAddress addr = bs.getLocalAddress();
         BookieClient bc = new BookieClient(new ClientConfiguration(), 
eventLoopGroup, executor,
                                            scheduler, 
NullStatsLogger.INSTANCE);
         synchronized (arc) {
@@ -267,7 +266,7 @@ public void testNoLedger() throws Exception {
 
     @Test
     public void testGetBookieInfo() throws IOException, InterruptedException {
-        BookieSocketAddress addr = new BookieSocketAddress("127.0.0.1", port);
+        BookieSocketAddress addr = bs.getLocalAddress();
         BookieClient bc = new BookieClient(new ClientConfiguration(), new 
NioEventLoopGroup(), executor,
                                            scheduler, 
NullStatsLogger.INSTANCE);
         long flags = 
BookkeeperProtocol.GetBookieInfoRequest.Flags.FREE_DISK_SPACE_VALUE


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to