Review Board 1.7.22


ZOOKEEPER-1182 Make findbugs usable in Eclipse

Review Request #1880 - Created Sept. 14, 2011 and submitted

Thomas Koch
ZOOKEEPER-1182
Reviewers
zookeeper
zookeeper-git
.

 

Changes between revision 1 and 2

1 2
1 2

  1. src/java/test/org/apache/zookeeper/test/CnxManagerTest.java: Loading...
src/java/test/org/apache/zookeeper/test/CnxManagerTest.java
Diff Revision 1 Diff Revision 2
[20] 225 lines
[+20] [+] public void testCnxManagerSpinLock() throws Exception {
226
        LOG.info("Election port: " + port);
226
        LOG.info("Election port: " + port);
227

    
   
227

   
228
        Thread.sleep(1000);
228
        Thread.sleep(1000);
229

    
   
229

   
230
        SocketChannel sc = SocketChannel.open();
230
        SocketChannel sc = SocketChannel.open();
231
        sc.socket().connect(peers.get(1l).electionAddr, 5000);
231
        sc.socket().connect(peers.get(1L).electionAddr, 5000);
232

    
   
232

   
233
        /*
233
        /*
234
         * Write id first then negative length.
234
         * Write id first then negative length.
235
         */
235
         */
236
        byte[] msgBytes = new byte[8];
236
        byte[] msgBytes = new byte[8];
237
        ByteBuffer msgBuffer = ByteBuffer.wrap(msgBytes);
237
        ByteBuffer msgBuffer = ByteBuffer.wrap(msgBytes);
238
        msgBuffer.putLong(2l);
238
        msgBuffer.putLong(2L);
239
        msgBuffer.position(0);
239
        msgBuffer.position(0);
240
        sc.write(msgBuffer);
240
        sc.write(msgBuffer);
241

    
   
241

   
242
        msgBuffer = ByteBuffer.wrap(new byte[4]);
242
        msgBuffer = ByteBuffer.wrap(new byte[4]);
243
        msgBuffer.putInt(-20);
243
        msgBuffer.putInt(-20);
[+20] [20] 124 lines
  1. src/java/test/org/apache/zookeeper/test/CnxManagerTest.java: Loading...