This is an automated email from the ASF dual-hosted git repository.

dlmarion pushed a commit to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/elasticity by this push:
     new 522349958b Updates to enable ITs (#4016)
522349958b is described below

commit 522349958bdc87619d2c714e8d7463ac3d071d1b
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Mon Dec 4 15:29:28 2023 -0500

    Updates to enable ITs (#4016)
    
    Removed Disabled annotation on some ITs that are working
    now with no changes. Fixed up some ITs that needed tablets
    hosted for them to work. Removed CleanTmpIT as the process
    for cleaning tmp files changed with #3955
---
 .../org/apache/accumulo/test/AuditMessageIT.java   |   8 +-
 .../java/org/apache/accumulo/test/CleanWalIT.java  |   2 -
 .../accumulo/test/functional/BigRootTabletIT.java  |   2 -
 .../accumulo/test/functional/CleanTmpIT.java       | 119 ---------------------
 .../test/functional/DeleteRowsSplitIT.java         |   2 -
 .../test/functional/MetadataMaxFilesIT.java        |   6 +-
 .../test/functional/WriteAheadLogEncryptedIT.java  |   2 -
 .../accumulo/test/functional/WriteAheadLogIT.java  |   2 -
 8 files changed, 8 insertions(+), 135 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java 
b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
index 2e6ee5054a..73fc89659b 100644
--- a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
@@ -45,7 +45,9 @@ import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.ImportConfiguration;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
 import org.apache.accumulo.core.client.admin.TableOperations;
+import org.apache.accumulo.core.client.admin.TabletHostingGoal;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -61,7 +63,6 @@ import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.io.Text;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -444,13 +445,14 @@ public class AuditMessageIT extends ConfigurableMacBase {
   }
 
   @Test
-  @Disabled // ELASTICITY_TODO
   public void testDeniedAudits() throws AccumuloSecurityException, 
AccumuloException,
       TableExistsException, TableNotFoundException, IOException {
 
     // Create our user with no privs
     client.securityOperations().createLocalUser(AUDIT_USER_1, new 
PasswordToken(PASSWORD));
-    client.tableOperations().create(OLD_TEST_TABLE_NAME);
+    NewTableConfiguration ntc =
+        new 
NewTableConfiguration().withInitialHostingGoal(TabletHostingGoal.ALWAYS);
+    client.tableOperations().create(OLD_TEST_TABLE_NAME, ntc);
     auditAccumuloClient =
         getCluster().createAccumuloClient(AUDIT_USER_1, new 
PasswordToken(PASSWORD));
 
diff --git a/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java 
b/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
index dabd72c6bd..d1b328178d 100644
--- a/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
@@ -44,14 +44,12 @@ import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.RawLocalFileSystem;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
 
-@Disabled // ELASTICITY_TODO
 public class CleanWalIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(CleanWalIT.class);
 
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/BigRootTabletIT.java 
b/test/src/main/java/org/apache/accumulo/test/functional/BigRootTabletIT.java
index 5310d74203..d3b916dcf9 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/BigRootTabletIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/BigRootTabletIT.java
@@ -32,10 +32,8 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
-@Disabled // ELASTICITY_TODO
 public class BigRootTabletIT extends AccumuloClusterHarness {
   // ACCUMULO-542: A large root tablet will fail to load if it does't fit in 
the tserver scan
   // buffers
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/CleanTmpIT.java 
b/test/src/main/java/org/apache/accumulo/test/functional/CleanTmpIT.java
deleted file mode 100644
index e0ab80f3ce..0000000000
--- a/test/src/main/java/org/apache/accumulo/test/functional/CleanTmpIT.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.accumulo.test.functional;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.time.Duration;
-import java.util.Map.Entry;
-
-import org.apache.accumulo.core.client.Accumulo;
-import org.apache.accumulo.core.client.AccumuloClient;
-import org.apache.accumulo.core.client.BatchWriter;
-import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.data.Key;
-import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.data.Range;
-import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.metadata.StoredTabletFile;
-import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
-import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.RawLocalFileSystem;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Iterators;
-
-@Disabled // ELASTICITY_TODO
-public class CleanTmpIT extends ConfigurableMacBase {
-  private static final Logger log = LoggerFactory.getLogger(CleanTmpIT.class);
-
-  @Override
-  protected Duration defaultTimeout() {
-    return Duration.ofMinutes(4);
-  }
-
-  @Override
-  public void configure(MiniAccumuloConfigImpl cfg, Configuration 
hadoopCoreSite) {
-    cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "15s");
-    cfg.getClusterServerConfiguration().setNumDefaultTabletServers(1);
-    // use raw local file system so walogs sync and flush will work
-    hadoopCoreSite.set("fs.file.impl", RawLocalFileSystem.class.getName());
-  }
-
-  @Test
-  public void test() throws Exception {
-    try (AccumuloClient c = 
Accumulo.newClient().from(getClientProperties()).build()) {
-      // make a table
-      String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      // write to it
-      try (BatchWriter bw = c.createBatchWriter(tableName)) {
-        Mutation m = new Mutation("row");
-        m.put("cf", "cq", "value");
-        bw.addMutation(m);
-        bw.flush();
-        // Compact memory to make a file
-        c.tableOperations().compact(tableName, null, null, true, true);
-        // Make sure that we'll have a WAL
-        m = new Mutation("row2");
-        m.put("cf", "cq", "value");
-        bw.addMutation(m);
-      }
-
-      // create a fake _tmp file in its directory
-      String id = c.tableOperations().tableIdMap().get(tableName);
-      Path file;
-      try (Scanner s = c.createScanner(MetadataTable.NAME, 
Authorizations.EMPTY)) {
-        s.setRange(Range.prefix(id));
-        s.fetchColumnFamily(DataFileColumnFamily.NAME);
-        Entry<Key,Value> entry = getOnlyElement(s);
-        file = 
StoredTabletFile.of(entry.getKey().getColumnQualifier()).getPath();
-      }
-
-      FileSystem fs = getCluster().getFileSystem();
-      assertTrue(fs.exists(file), "Could not find file: " + file);
-      Path tabletDir = file.getParent();
-      assertNotNull(tabletDir, "Tablet dir should not be null");
-      Path tmp = new Path(tabletDir, "junk.rf_tmp");
-      // Make the file
-      fs.create(tmp).close();
-      log.info("Created tmp file {}", tmp);
-      getCluster().stop();
-      getCluster().start();
-
-      try (Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY)) 
{
-        assertEquals(2, Iterators.size(scanner.iterator()));
-        // If we performed log recovery, we should have cleaned up any stray 
files
-        assertFalse(fs.exists(tmp), "File still exists: " + tmp);
-      }
-    }
-  }
-}
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java 
b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
index 33d360c5fe..e8b04be8f2 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
@@ -39,13 +39,11 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.hadoop.io.Text;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 // attempt to reproduce ACCUMULO-315
-@Disabled // ELASTICITY_TODO
 public class DeleteRowsSplitIT extends AccumuloClusterHarness {
 
   private static final Logger log = 
LoggerFactory.getLogger(DeleteRowsSplitIT.class);
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
 
b/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
index d2c84b5265..4da45870ef 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
@@ -28,6 +28,7 @@ import java.util.TreeSet;
 import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.admin.NewTableConfiguration;
+import org.apache.accumulo.core.client.admin.TabletHostingGoal;
 import org.apache.accumulo.core.clientImpl.ClientContext;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo;
@@ -41,10 +42,8 @@ import 
org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.RawLocalFileSystem;
 import org.apache.hadoop.io.Text;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
-@Disabled // ELASTICITY_TODO
 public class MetadataMaxFilesIT extends ConfigurableMacBase {
 
   @Override
@@ -73,7 +72,8 @@ public class MetadataMaxFilesIT extends ConfigurableMacBase {
       for (int i = 0; i < 2; i++) {
         String tableName = "table" + i;
         log.info("Creating {} with splits", tableName);
-        NewTableConfiguration ntc = new 
NewTableConfiguration().withSplits(splits);
+        NewTableConfiguration ntc = new 
NewTableConfiguration().withSplits(splits)
+            .withInitialHostingGoal(TabletHostingGoal.ALWAYS);
         c.tableOperations().create(tableName, ntc);
         log.info("flushing");
         c.tableOperations().flush(MetadataTable.NAME, null, null, true);
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogEncryptedIT.java
 
b/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogEncryptedIT.java
index 9a090da29b..1bbceac3ec 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogEncryptedIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogEncryptedIT.java
@@ -31,12 +31,10 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Disabled // ELASTICITY_TODO
 public class WriteAheadLogEncryptedIT extends AccumuloClusterHarness {
 
   private static final Logger log = 
LoggerFactory.getLogger(WriteAheadLogEncryptedIT.class);
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java 
b/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java
index 528889aa36..7b617f2824 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/WriteAheadLogIT.java
@@ -29,10 +29,8 @@ import org.apache.accumulo.test.VerifyIngest;
 import org.apache.accumulo.test.VerifyIngest.VerifyParams;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.RawLocalFileSystem;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
-@Disabled // ELASTICITY_TODO
 public class WriteAheadLogIT extends AccumuloClusterHarness {
 
   @Override

Reply via email to