| Chunk |
|---|
| Conflicting content |
|---|
assertFalse(c.tableOperations().listConstraints(t1).containsKey(constraintClassName));
c.namespaceOperations().addConstraint(namespace, constraintClassName);
<<<<<<< HEAD:test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
assertTrue(c.namespaceOperations().listConstraints(namespace).containsKey(constraintClassName));
assertTrue(c.tableOperations().listConstraints(t1).containsKey(constraintClassName));
int num = c.namespaceOperations().listConstraints(namespace).get(constraintClassName);
assertEquals(num, (int) c.tableOperations().listConstraints(t1).get(constraintClassName));
// doesn't take effect immediately, needs time to propagate to tserver's ZooKeeper cache
sleepUninterruptibly(250, TimeUnit.MILLISECONDS);
=======
boolean passed = false;
for (int i = 0; i < 5; i++) {
if (!c.namespaceOperations().listConstraints(namespace).containsKey(constraintClassName)) {
Thread.sleep(500);
continue;
}
if (!c.tableOperations().listConstraints(t1).containsKey(constraintClassName)) {
Thread.sleep(500);
continue;
}
passed = true;
break;
}
assertTrue("Failed to observe newly-added constraint", passed);
passed = false;
Integer namespaceNum = null;
for (int i = 0; i < 5; i++) {
namespaceNum = c.namespaceOperations().listConstraints(namespace).get(constraintClassName);
if (null == namespaceNum) {
Thread.sleep(500);
continue;
}
Integer tableNum = c.tableOperations().listConstraints(t1).get(constraintClassName);
if (null == tableNum) {
Thread.sleep(500);
continue;
}
assertEquals(namespaceNum, tableNum);
passed = true;
}
assertTrue("Failed to observe constraint in both table and namespace", passed);
>>>>>>> a4bc71b4d6d12a4c7a8f1c6f70e83a1d5dc70e44:test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
Mutation m1 = new Mutation("r1");
Mutation m2 = new Mutation("r2"); |
| Solution content |
|---|
assertFalse(c.tableOperations().listConstraints(t1).containsKey(constraintClassName));
c.namespaceOperations().addConstraint(namespace, constraintClassName);
boolean passed = false;
for (int i = 0; i < 5; i++) {
if (!c.namespaceOperations().listConstraints(namespace).containsKey(constraintClassName)) {
Thread.sleep(500);
continue;
}
if (!c.tableOperations().listConstraints(t1).containsKey(constraintClassName)) {
Thread.sleep(500);
continue;
}
passed = true;
break;
}
assertTrue("Failed to observe newly-added constraint", passed);
passed = false;
Integer namespaceNum = null;
for (int i = 0; i < 5; i++) {
namespaceNum = c.namespaceOperations().listConstraints(namespace).get(constraintClassName);
if (null == namespaceNum) {
Thread.sleep(500);
continue;
}
Integer tableNum = c.tableOperations().listConstraints(t1).get(constraintClassName);
if (null == tableNum) {
Thread.sleep(500);
continue;
}
assertEquals(namespaceNum, tableNum);
passed = true;
}
assertTrue("Failed to observe constraint in both table and namespace", passed);
Mutation m1 = new Mutation("r1");
Mutation m2 = new Mutation("r2"); |
| File |
|---|
| NamespacesIT.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| For statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
break;
}
}
<<<<<<< HEAD:test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
c.namespaceOperations().removeConstraint(namespace, num);
assertFalse(c.namespaceOperations().listConstraints(namespace).containsKey(constraintClassName));
assertFalse(c.tableOperations().listConstraints(t1).containsKey(constraintClassName));
// doesn't take effect immediately, needs time to propagate to tserver's ZooKeeper cache
sleepUninterruptibly(250, TimeUnit.MILLISECONDS);
=======
>>>>>>> a4bc71b4d6d12a4c7a8f1c6f70e83a1d5dc70e44:test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
assertTrue("Failed to see mutations rejected after constraint was added", passed);
|
| Solution content |
|---|
break;
}
}
assertTrue("Failed to see mutations rejected after constraint was added", passed);
|
| File |
|---|
| NamespacesIT.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |