accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlmar...@apache.org
Subject accumulo git commit: Pass in unmodifiable objects in the tests to the balancer to emulate what the Master will do
Date Wed, 30 Mar 2016 19:51:13 GMT
Repository: accumulo
Updated Branches:
  refs/heads/ACCUMULO-4173 59f3fc7b9 -> fafcefdf4


Pass in unmodifiable objects in the tests to the balancer to emulate what the Master will
do


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fafcefdf
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fafcefdf
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fafcefdf

Branch: refs/heads/ACCUMULO-4173
Commit: fafcefdf4c60b289f400ec313de58b0c8f79c099
Parents: 59f3fc7
Author: Dave Marion <dlmarion@apache.org>
Authored: Wed Mar 30 15:50:12 2016 -0400
Committer: Dave Marion <dlmarion@apache.org>
Committed: Wed Mar 30 15:50:12 2016 -0400

----------------------------------------------------------------------
 .../balancer/HostRegexTableLoadBalancerTest.java      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fafcefdf/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
index c33752a..22bda0b 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
@@ -307,7 +307,7 @@ public class HostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer
{
   public void testBalanceWithMigrations() {
     List<TabletMigration> migrations = new ArrayList<>();
     init((ServerConfiguration) factory);
-    long wait = this.balance(createCurrent(2), Collections.singleton(new KeyExtent()), migrations);
+    long wait = this.balance(Collections.unmodifiableSortedMap(createCurrent(2)), Collections.singleton(new
KeyExtent()), migrations);
     Assert.assertEquals(5000, wait);
     Assert.assertEquals(0, migrations.size());
   }
@@ -482,7 +482,7 @@ public class HostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer
{
         unassigned.put(ke, null);
       }
     }
-    this.getAssignments(allTabletServers, unassigned, assignments);
+    this.getAssignments(Collections.unmodifiableSortedMap(allTabletServers), Collections.unmodifiableMap(unassigned),
assignments);
     Assert.assertEquals(15, assignments.size());
     // Ensure unique tservers
     for (Entry<KeyExtent,TServerInstance> e : assignments.entrySet()) {
@@ -504,16 +504,16 @@ public class HostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer
{
   }
 
   @Test
-  public void testAllAassigned() {
+  public void testAllAssigned() {
     init((ServerConfiguration) factory);
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
-    this.getAssignments(allTabletServers, unassigned, assignments);
+    this.getAssignments(Collections.unmodifiableSortedMap(allTabletServers), Collections.unmodifiableMap(unassigned),
assignments);
     Assert.assertEquals(0, assignments.size());
   }
 
   @Test
-  public void testPartiallyAassigned() {
+  public void testPartiallyAssigned() {
     init((ServerConfiguration) factory);
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
@@ -526,7 +526,7 @@ public class HostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer
{
         i++;
       }
     }
-    this.getAssignments(allTabletServers, unassigned, assignments);
+    this.getAssignments(Collections.unmodifiableSortedMap(allTabletServers), Collections.unmodifiableMap(unassigned),
assignments);
     Assert.assertEquals(unassigned.size(), assignments.size());
     // Ensure unique tservers
     for (Entry<KeyExtent,TServerInstance> e : assignments.entrySet()) {
@@ -559,7 +559,7 @@ public class HostRegexTableLoadBalancerTest extends HostRegexTableLoadBalancer
{
         unassigned.put(ke, null);
       }
     }
-    this.getAssignments(allTabletServers, unassigned, assignments);
+    this.getAssignments(Collections.unmodifiableSortedMap(allTabletServers), Collections.unmodifiableMap(unassigned),
assignments);
     Assert.assertEquals(15, assignments.size());
     // Ensure unique tservers
     for (Entry<KeyExtent,TServerInstance> e : assignments.entrySet()) {


Mime
View raw message