This is an automated email from the ASF dual-hosted git repository.
krathbun 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 c9bcd3bee4 Fixes some FATE tests: (#5820)
c9bcd3bee4 is described below
commit c9bcd3bee4059534db569460b9d3ed8f5935023c
Author: Kevin Rathbun <[email protected]>
AuthorDate: Fri Aug 22 15:38:42 2025 -0400
Fixes some FATE tests: (#5820)
Some uses of UserFateStore were creating the UserFateStore before
creating the table that the UserFateStore is using. This can lead to
failures.
closes #5818
---
.../test/fate/user/UserFateExecutionOrderIT_SimpleSuite.java | 12 +++++++-----
.../accumulo/test/fate/user/UserFateIT_SimpleSuite.java | 10 ++++++----
.../test/fate/user/UserFatePoolsWatcherIT_SimpleSuite.java | 10 ++++++----
.../test/fate/user/UserFateStoreFateIT_SimpleSuite.java | 10 ++++++----
4 files changed, 25 insertions(+), 17 deletions(-)
diff --git
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateExecutionOrderIT_SimpleSuite.java
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateExecutionOrderIT_SimpleSuite.java
index 264096e06d..a11f2d4baf 100644
---
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateExecutionOrderIT_SimpleSuite.java
+++
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateExecutionOrderIT_SimpleSuite.java
@@ -33,12 +33,14 @@ public class UserFateExecutionOrderIT_SimpleSuite extends
FateExecutionOrderITBa
public void executeTest(FateTestExecutor<FeoTestEnv> testMethod, int
maxDeferred,
AbstractFateStore.FateIdGenerator fateIdGenerator) throws Exception {
var table = getUniqueNames(1)[0];
- try (ClientContext client = (ClientContext)
Accumulo.newClient().from(getClientProps()).build();
- FateStore<FeoTestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
- maxDeferred, fateIdGenerator)) {
+ try (ClientContext client =
+ (ClientContext) Accumulo.newClient().from(getClientProps()).build()) {
createFateTable(client, table);
- testMethod.execute(fs, getCluster().getServerContext());
- client.tableOperations().delete(table);
+ try (FateStore<FeoTestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
+ maxDeferred, fateIdGenerator)) {
+ testMethod.execute(fs, getCluster().getServerContext());
+ client.tableOperations().delete(table);
+ }
}
}
}
diff --git
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT_SimpleSuite.java
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT_SimpleSuite.java
index 0719768683..e9cd7f07a8 100644
---
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT_SimpleSuite.java
+++
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateIT_SimpleSuite.java
@@ -66,11 +66,13 @@ public class UserFateIT_SimpleSuite extends FateITBase {
public void executeTest(FateTestExecutor<TestEnv> testMethod, int
maxDeferred,
FateIdGenerator fateIdGenerator) throws Exception {
table = getUniqueNames(1)[0];
- try (ClientContext client = (ClientContext)
Accumulo.newClient().from(getClientProps()).build();
- FateStore<TestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
- maxDeferred, fateIdGenerator)) {
+ try (ClientContext client =
+ (ClientContext) Accumulo.newClient().from(getClientProps()).build()) {
createFateTable(client, table);
- testMethod.execute(fs, getCluster().getServerContext());
+ try (FateStore<TestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
+ maxDeferred, fateIdGenerator)) {
+ testMethod.execute(fs, getCluster().getServerContext());
+ }
}
}
diff --git
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFatePoolsWatcherIT_SimpleSuite.java
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFatePoolsWatcherIT_SimpleSuite.java
index 5c4d05d516..968038860e 100644
---
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFatePoolsWatcherIT_SimpleSuite.java
+++
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFatePoolsWatcherIT_SimpleSuite.java
@@ -49,11 +49,13 @@ public class UserFatePoolsWatcherIT_SimpleSuite extends
FatePoolsWatcherITBase {
public void executeTest(FateTestExecutor<PoolResizeTestEnv> testMethod, int
maxDeferred,
AbstractFateStore.FateIdGenerator fateIdGenerator) throws Exception {
table = getUniqueNames(1)[0];
- try (ClientContext client = (ClientContext)
Accumulo.newClient().from(getClientProps()).build();
- FateStore<PoolResizeTestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(),
- null, maxDeferred, fateIdGenerator)) {
+ try (ClientContext client =
+ (ClientContext) Accumulo.newClient().from(getClientProps()).build()) {
createFateTable(client, table);
- testMethod.execute(fs, getCluster().getServerContext());
+ try (FateStore<PoolResizeTestEnv> fs = new UserFateStore<>(client,
table, createDummyLockID(),
+ null, maxDeferred, fateIdGenerator)) {
+ testMethod.execute(fs, getCluster().getServerContext());
+ }
}
}
}
diff --git
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreFateIT_SimpleSuite.java
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreFateIT_SimpleSuite.java
index 5072f0176b..aa6b47ba39 100644
---
a/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreFateIT_SimpleSuite.java
+++
b/test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreFateIT_SimpleSuite.java
@@ -55,11 +55,13 @@ public class UserFateStoreFateIT_SimpleSuite extends
FateStoreITBase {
public void executeTest(FateTestExecutor<TestEnv> testMethod, int
maxDeferred,
FateIdGenerator fateIdGenerator) throws Exception {
String table = getUniqueNames(1)[0] + "fatestore";
- try (ClientContext client = (ClientContext)
Accumulo.newClient().from(getClientProps()).build();
- FateStore<TestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
- maxDeferred, fateIdGenerator)) {
+ try (ClientContext client =
+ (ClientContext) Accumulo.newClient().from(getClientProps()).build()) {
createFateTable(client, table);
- testMethod.execute(fs, getCluster().getServerContext());
+ try (FateStore<TestEnv> fs = new UserFateStore<>(client, table,
createDummyLockID(), null,
+ maxDeferred, fateIdGenerator)) {
+ testMethod.execute(fs, getCluster().getServerContext());
+ }
}
}