Class FateConcurrencyIT
- java.lang.Object
-
- org.apache.accumulo.harness.WithTestNames
-
- org.apache.accumulo.harness.AccumuloITBase
-
- org.apache.accumulo.harness.AccumuloClusterHarness
-
- org.apache.accumulo.test.functional.FateConcurrencyIT
-
- All Implemented Interfaces:
ClusterUsers
,MiniClusterConfigurationCallback
public class FateConcurrencyIT extends AccumuloClusterHarness
IT Tests that create / run a "slow" FATE transaction so that other operations can be checked. Included tests for:- ACCUMULO-4574. Test to verify that changing table state to online / offline
TableOperations.online(String)
when the table is already in that state returns without blocking. - AdminUtil refactor to provide methods that provide FATE status, one with table lock info (original) and additional method without.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
AccumuloClusterHarness.ClusterType
-
Nested classes/interfaces inherited from interface org.apache.accumulo.harness.MiniClusterConfigurationCallback
MiniClusterConfigurationCallback.NoCallback
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
cluster, clusterConf, krb, type
-
Fields inherited from class org.apache.accumulo.harness.AccumuloITBase
MINI_CLUSTER_ONLY, random, STANDALONE_CAPABLE_CLUSTER, SUNNY_DAY, ZOOKEEPER_TESTING_SERVER
-
Fields inherited from interface org.apache.accumulo.harness.MiniClusterConfigurationCallback
NO_CALLBACK
-
-
Constructor Summary
Constructors Constructor Description FateConcurrencyIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeTableStateTest()
Validate thatTableOperations
online operation does not block when table is already online and fate transaction lock is held by other operations.static void
cleanup()
void
closeClient()
protected Duration
defaultTimeout()
Time to wait per-method before declaring a timeout, in seconds.void
getFateStatus()
Validate the AdminUtil.getStatus works correctly after refactor and validate that getTransactionStatus can be called without lock map(s).void
multipleCompactions()
Concurrency testing - ensure that tests are valid if multiple compactions are running.void
setup()
-
Methods inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
canRunTest, cleanupTables, cleanupUsers, configureMiniCluster, getAdminPrincipal, getAdminToken, getAdminUser, getClientInfo, getClientProps, getCluster, getClusterConfiguration, getClusterControl, getClusterType, getFileSystem, getKdc, getServerContext, getUser, saslEnabled, setupCluster, setUpHarness, teardownCluster, tearDownHarness
-
Methods inherited from class org.apache.accumulo.harness.AccumuloITBase
createTestDir, getOnlyElement, getOnlyElement, getSslDir, getUniqueNames, initJar
-
Methods inherited from class org.apache.accumulo.harness.WithTestNames
setTestName, testName
-
-
-
-
Method Detail
-
defaultTimeout
protected Duration defaultTimeout()
Description copied from class:AccumuloITBase
Time to wait per-method before declaring a timeout, in seconds.- Overrides:
defaultTimeout
in classAccumuloITBase
-
setup
@BeforeEach public void setup()
-
closeClient
@AfterEach public void closeClient()
-
cleanup
@AfterAll public static void cleanup()
-
changeTableStateTest
@Test public void changeTableStateTest() throws Exception
Validate thatTableOperations
online operation does not block when table is already online and fate transaction lock is held by other operations. The test creates, populates a table and then runs a compaction with a slow iterator so that operation takes long enough to simulate the condition. After the online operation while compaction is running completes, the test is complete and the compaction is canceled so that other tests can run.- Throws:
Exception
- any exception is a test failure.
-
getFateStatus
@Test public void getFateStatus()
Validate the AdminUtil.getStatus works correctly after refactor and validate that getTransactionStatus can be called without lock map(s). The test starts a long running fate transaction (slow compaction) and the calls AdminUtil functions to get the FATE.
-
multipleCompactions
@Test public void multipleCompactions()
Concurrency testing - ensure that tests are valid if multiple compactions are running. for development testing - force transient condition that was failing this test so that we know if multiple compactions are running, they are properly handled by the test code and the tests are valid.
-
-