incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1027799 - /incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java
Date Wed, 27 Oct 2010 01:55:58 GMT
Author: edwardyoon
Date: Wed Oct 27 01:55:57 2010
New Revision: 1027799

URL: http://svn.apache.org/viewvc?rev=1027799&view=rev
Log:
Fix unit test - HAMA-316

Modified:
    incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java

Modified: incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java?rev=1027799&r1=1027798&r2=1027799&view=diff
==============================================================================
--- incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java (original)
+++ incubator/hama/trunk/src/test/org/apache/hama/bsp/TestBSPPeer.java Wed Oct 27 01:55:57
2010
@@ -87,7 +87,7 @@ public class TestBSPPeer extends HamaClu
       this.peer = new BSPPeer(conf);
       Set<String> peerNames = new HashSet<String>(NUM_PEER);
       for (int i = 0; i < NUM_PEER; i++) {
-        peerNames.add("localhost_" + (30000 + i));
+        peerNames.add("localhost:" + (30000 + i));
       }
       peer.setAllPeerNames(peerNames);
     }
@@ -104,7 +104,7 @@ public class TestBSPPeer extends HamaClu
         for (int j = 0; j < 10; j++) {
           r.nextBytes(dummyData);
           msg = new BSPMessage(Bytes.tail(dummyData, 128), dummyData);
-          String peerName = "localhost_" + (30000 + j);
+          String peerName = "localhost:" + (30000 + j);
           try {
             peer.send(peerName, msg);
           } catch (IOException e) {
@@ -131,6 +131,8 @@ public class TestBSPPeer extends HamaClu
         assertEquals(peer.getNumCurrentMessages(), 1);
         verifyPayload();
       }
+      
+      assertEquals(peer.getNumCurrentMessages(), NUM_PEER * ROUND);
     }
 
     private void verifyPayload() {



Mime
View raw message