This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new b9bf07e68f Fixed testRootTabletUpdate test method to re-host root
tablet (#5441)
b9bf07e68f is described below
commit b9bf07e68fc8e1ed7002b93df304fb2bcc9b920d
Author: Dave Marion <[email protected]>
AuthorDate: Tue Apr 1 14:17:25 2025 -0400
Fixed testRootTabletUpdate test method to re-host root tablet (#5441)
The testRootTabletUpdate test was setting an operationId on
the root tablet, which ends up causing the tablet to become
unhosted causing the remaining tests to time out. Added code
to the test to unset the operationId and set a future location
for the root tablet so that it will once again be hosted.
Closes #5440
---
.../test/functional/AmpleConditionalWriterIT.java | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git
a/test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java
b/test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java
index 11e529fb7c..e48f124737 100644
---
a/test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/functional/AmpleConditionalWriterIT.java
@@ -67,6 +67,7 @@ import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.client.admin.TabletAvailability;
import org.apache.accumulo.core.client.admin.TimeType;
+import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.TableId;
@@ -107,6 +108,7 @@ import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.metadata.AsyncConditionalTabletsMutatorImpl;
import org.apache.accumulo.server.metadata.ConditionalTabletsMutatorImpl;
+import org.apache.accumulo.test.util.Wait;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.junit.jupiter.api.AfterAll;
@@ -121,7 +123,9 @@ public class AmpleConditionalWriterIT extends
SharedMiniClusterBase {
@BeforeAll
public static void setup() throws Exception {
- SharedMiniClusterBase.startMiniCluster();
+ SharedMiniClusterBase.startMiniClusterWithConfig((cfg, coreSite) -> {
+ cfg.setProperty(Property.MANAGER_TABLET_GROUP_WATCHER_INTERVAL, "3s");
+ });
}
@AfterAll
@@ -1058,6 +1062,18 @@ public class AmpleConditionalWriterIT extends
SharedMiniClusterBase {
}
assertEquals(opid.canonical(),
context.getAmple().readTablet(RootTable.EXTENT).getOperationId().canonical());
+
+ Wait.waitFor(() ->
context.getAmple().readTablet(RootTable.EXTENT).getLocation() == null);
+
+ try (var ctmi = new ConditionalTabletsMutatorImpl(context)) {
+
ctmi.mutateTablet(RootTable.EXTENT).requireOperation(opid).requireAbsentLocation()
+
.putLocation(Location.future(loc.getServerInstance())).deleteOperation()
+ .submit(tm -> false);
+ assertEquals(Status.ACCEPTED,
ctmi.process().get(RootTable.EXTENT).getStatus());
+ }
+
assertNull(context.getAmple().readTablet(RootTable.EXTENT).getOperationId());
+ Wait.waitFor(() ->
context.getAmple().readTablet(RootTable.EXTENT).getLocation() != null);
+
}
@Test