diff --git a/core/src/test/java/org/apache/accumulo/core/classloader/ContextClassLoaderFactoryTest.java b/core/src/test/java/org/apache/accumulo/core/classloader/ContextClassLoaderFactoryTest.java index 352e7ce5d4a..440d6ca72b4 100644 --- a/core/src/test/java/org/apache/accumulo/core/classloader/ContextClassLoaderFactoryTest.java +++ b/core/src/test/java/org/apache/accumulo/core/classloader/ContextClassLoaderFactoryTest.java @@ -63,9 +63,10 @@ public void setup() throws Exception { if (!Files.isDirectory(folder2)) { Files.createDirectories(folder2); } - Path propsFile2 = folder2.resolve("accumulo2.properties"); + Path propsFile2 = folder2.resolve("org/apache/accumulo/core/accumulo2.properties"); FileUtils.copyURLToFile( - Objects.requireNonNull(this.getClass().getResource("/accumulo2.properties")), + Objects.requireNonNull( + this.getClass().getResource("/org/apache/accumulo/core/accumulo2.properties")), propsFile2.toFile()); uri2 = propsFile2.toUri().toURL(); diff --git a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderTokenTest.java b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderTokenTest.java index d00f3dbe7fc..dfd59c67f62 100644 --- a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderTokenTest.java +++ b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/CredentialProviderTokenTest.java @@ -51,7 +51,8 @@ public class CredentialProviderTokenTest { justification = "keystoreUrl location isn't provided by user input") @BeforeAll public static void setup() throws Exception { - URL keystoreUrl = CredentialProviderTokenTest.class.getResource("/passwords.jceks"); + URL keystoreUrl = + CredentialProviderTokenTest.class.getResource("/org/apache/accumulo/core/passwords.jceks"); assertNotNull(keystoreUrl); keystorePath = "jceks://file/" + Path.of(keystoreUrl.toURI()).toAbsolutePath(); } diff --git a/core/src/test/java/org/apache/accumulo/core/clientImpl/ClientContextTest.java b/core/src/test/java/org/apache/accumulo/core/clientImpl/ClientContextTest.java index 5452da6c7ca..b9000b43d67 100644 --- a/core/src/test/java/org/apache/accumulo/core/clientImpl/ClientContextTest.java +++ b/core/src/test/java/org/apache/accumulo/core/clientImpl/ClientContextTest.java @@ -44,7 +44,7 @@ public class ClientContextTest { - private static final String keystoreName = "/site-cfg.jceks"; + private static final String keystoreName = "/org/apache/accumulo/core/site-cfg.jceks"; // site-cfg.jceks={'ignored.property'=>'ignored', 'instance.secret'=>'mysecret', // 'general.rpc.timeout'=>'timeout'} diff --git a/core/src/test/java/org/apache/accumulo/core/conf/HadoopCredentialProviderTest.java b/core/src/test/java/org/apache/accumulo/core/conf/HadoopCredentialProviderTest.java index 85b3f3738ac..1607bddc044 100644 --- a/core/src/test/java/org/apache/accumulo/core/conf/HadoopCredentialProviderTest.java +++ b/core/src/test/java/org/apache/accumulo/core/conf/HadoopCredentialProviderTest.java @@ -51,8 +51,8 @@ public class HadoopCredentialProviderTest { private static final Configuration hadoopConf = new Configuration(); - private static final String populatedKeyStoreName = "/accumulo.jceks"; - private static final String emptyKeyStoreName = "/empty.jceks"; + private static final String populatedKeyStoreName = "/org/apache/accumulo/core/accumulo.jceks"; + private static final String emptyKeyStoreName = "/org/apache/accumulo/core/empty.jceks"; private static File emptyKeyStore; private static File populatedKeyStore; diff --git a/core/src/test/java/org/apache/accumulo/core/conf/SiteConfigurationTest.java b/core/src/test/java/org/apache/accumulo/core/conf/SiteConfigurationTest.java index 6afafc87120..e97c8a1615a 100644 --- a/core/src/test/java/org/apache/accumulo/core/conf/SiteConfigurationTest.java +++ b/core/src/test/java/org/apache/accumulo/core/conf/SiteConfigurationTest.java @@ -39,7 +39,8 @@ public class SiteConfigurationTest { @Test public void testOnlySensitivePropertiesExtractedFromCredentialProvider() throws SecurityException { - URL keystore = SiteConfigurationTest.class.getResource("/site-cfg.jceks"); + URL keystore = + SiteConfigurationTest.class.getResource("/org/apache/accumulo/core/site-cfg.jceks"); assertNotNull(keystore); String credProvPath = "jceks://file" + Path.of(keystore.getFile()).toAbsolutePath(); @@ -68,7 +69,8 @@ public void testDefault() { @Test public void testFile() { System.setProperty("DIR", "/tmp/test/dir"); - URL propsUrl = getClass().getClassLoader().getResource("accumulo2.properties"); + URL propsUrl = + getClass().getClassLoader().getResource("org/apache/accumulo/core/accumulo2.properties"); var conf = new SiteConfiguration.Builder().fromUrl(propsUrl).build(); assertEquals("myhost123:2181", conf.get(Property.INSTANCE_ZK_HOST)); assertEquals("mysecret", conf.get(Property.INSTANCE_SECRET)); diff --git a/core/src/test/resources/accumulo.jceks b/core/src/test/resources/org/apache/accumulo/core/accumulo.jceks similarity index 100% rename from core/src/test/resources/accumulo.jceks rename to core/src/test/resources/org/apache/accumulo/core/accumulo.jceks diff --git a/core/src/test/resources/accumulo2.properties b/core/src/test/resources/org/apache/accumulo/core/accumulo2.properties similarity index 100% rename from core/src/test/resources/accumulo2.properties rename to core/src/test/resources/org/apache/accumulo/core/accumulo2.properties diff --git a/core/src/test/resources/empty.jceks b/core/src/test/resources/org/apache/accumulo/core/empty.jceks similarity index 100% rename from core/src/test/resources/empty.jceks rename to core/src/test/resources/org/apache/accumulo/core/empty.jceks diff --git a/core/src/test/resources/passwords.jceks b/core/src/test/resources/org/apache/accumulo/core/passwords.jceks similarity index 100% rename from core/src/test/resources/passwords.jceks rename to core/src/test/resources/org/apache/accumulo/core/passwords.jceks diff --git a/core/src/test/resources/site-cfg.jceks b/core/src/test/resources/org/apache/accumulo/core/site-cfg.jceks similarity index 100% rename from core/src/test/resources/site-cfg.jceks rename to core/src/test/resources/org/apache/accumulo/core/site-cfg.jceks diff --git a/server/tserver/src/test/resources/walog-from-14/550e8400-e29b-41d4-a716-446655440000 b/server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-14/550e8400-e29b-41d4-a716-446655440000 similarity index 100% rename from server/tserver/src/test/resources/walog-from-14/550e8400-e29b-41d4-a716-446655440000 rename to server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-14/550e8400-e29b-41d4-a716-446655440000 diff --git a/server/tserver/src/test/resources/walog-from-15.walog b/server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-15.walog similarity index 100% rename from server/tserver/src/test/resources/walog-from-15.walog rename to server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-15.walog diff --git a/server/tserver/src/test/resources/walog-from-16.walog b/server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-16.walog similarity index 100% rename from server/tserver/src/test/resources/walog-from-16.walog rename to server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-16.walog diff --git a/server/tserver/src/test/resources/walog-from-20.walog b/server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-20.walog similarity index 100% rename from server/tserver/src/test/resources/walog-from-20.walog rename to server/tserver/src/test/resources/org/apache/accumulo/tserver/walog-from-20.walog diff --git a/src/build/ci/check-module-package-conventions.sh b/src/build/ci/check-module-package-conventions.sh index b555f0a6dcd..26a8b64075e 100755 --- a/src/build/ci/check-module-package-conventions.sh +++ b/src/build/ci/check-module-package-conventions.sh @@ -38,9 +38,9 @@ ALLOWED=( server/native/src/main/resources/NOTICE # TODO: these test classes should be moved into the correct package for the module - start/src/test/java/test/HelloWorldTemplate - start/src/test/java/test/TestTemplate - start/src/test/java/test/Test.java +# start/src/test/java/test/HelloWorldTemplate +# start/src/test/java/test/TestTemplate +# start/src/test/java/test/Test.java test/src/main/java/org/apache/accumulo/harness/conf/AccumuloClusterConfiguration.java test/src/main/java/org/apache/accumulo/harness/conf/AccumuloMiniClusterConfiguration.java test/src/main/java/org/apache/accumulo/harness/conf/AccumuloClusterPropertyConfiguration.java @@ -55,23 +55,23 @@ ALLOWED=( test/src/main/java/org/apache/accumulo/harness/TestingKdc.java # TODO: these test resources should be moved into the correct package for the module - core/src/test/resources/accumulo.jceks - core/src/test/resources/empty.jceks - core/src/test/resources/site-cfg.jceks - core/src/test/resources/accumulo2.properties - core/src/test/resources/passwords.jceks +# core/src/test/resources/accumulo.jceks +# core/src/test/resources/empty.jceks +# core/src/test/resources/site-cfg.jceks +# core/src/test/resources/accumulo2.properties +# core/src/test/resources/passwords.jceks minicluster/src/test/resources/FooFilter.jar - server/tserver/src/test/resources/walog-from-15.walog - server/tserver/src/test/resources/walog-from-16.walog - server/tserver/src/test/resources/walog-from-14/550e8400-e29b-41d4-a716-446655440000 - server/tserver/src/test/resources/walog-from-20.walog - test/src/main/resources/v2_import_test/README.md - test/src/main/resources/v2_import_test/data/A0000008.rf - test/src/main/resources/v2_import_test/data/A0000009.rf - test/src/main/resources/v2_import_test/data/A000000a.rf - test/src/main/resources/v2_import_test/data/A000000b.rf - test/src/main/resources/v2_import_test/data/distcp.txt - test/src/main/resources/v2_import_test/data/exportMetadata.zip +# server/tserver/src/test/resources/walog-from-15.walog +# server/tserver/src/test/resources/walog-from-16.walog +# server/tserver/src/test/resources/walog-from-14/550e8400-e29b-41d4-a716-446655440000 +# server/tserver/src/test/resources/walog-from-20.walog +# test/src/main/resources/v2_import_test/README.md +# test/src/main/resources/v2_import_test/data/A0000008.rf +# test/src/main/resources/v2_import_test/data/A0000009.rf +# test/src/main/resources/v2_import_test/data/A000000a.rf +# test/src/main/resources/v2_import_test/data/A000000b.rf +# test/src/main/resources/v2_import_test/data/distcp.txt +# test/src/main/resources/v2_import_test/data/exportMetadata.zip # TODO: these minicluster classes should be moved into the correct package for the module minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneAccumuloCluster.java diff --git a/start/src/test/java/test/HelloWorldTemplate b/start/src/test/java/org/apache/accumulo/start/HelloWorldTemplate similarity index 100% rename from start/src/test/java/test/HelloWorldTemplate rename to start/src/test/java/org/apache/accumulo/start/HelloWorldTemplate diff --git a/start/src/test/java/test/Test.java b/start/src/test/java/org/apache/accumulo/start/Test.java similarity index 96% rename from start/src/test/java/test/Test.java rename to start/src/test/java/org/apache/accumulo/start/Test.java index 3c2b196c15f..0b215003b4f 100644 --- a/start/src/test/java/test/Test.java +++ b/start/src/test/java/org/apache/accumulo/start/Test.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package test; +package org.apache.accumulo.start; public interface Test { diff --git a/start/src/test/java/test/TestTemplate b/start/src/test/java/org/apache/accumulo/start/TestTemplate similarity index 100% rename from start/src/test/java/test/TestTemplate rename to start/src/test/java/org/apache/accumulo/start/TestTemplate diff --git a/test/src/main/resources/v2_import_test/README.md b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/README.md similarity index 100% rename from test/src/main/resources/v2_import_test/README.md rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/README.md diff --git a/test/src/main/resources/v2_import_test/data/A0000008.rf b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A0000008.rf similarity index 100% rename from test/src/main/resources/v2_import_test/data/A0000008.rf rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A0000008.rf diff --git a/test/src/main/resources/v2_import_test/data/A0000009.rf b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A0000009.rf similarity index 100% rename from test/src/main/resources/v2_import_test/data/A0000009.rf rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A0000009.rf diff --git a/test/src/main/resources/v2_import_test/data/A000000a.rf b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A000000a.rf similarity index 100% rename from test/src/main/resources/v2_import_test/data/A000000a.rf rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A000000a.rf diff --git a/test/src/main/resources/v2_import_test/data/A000000b.rf b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A000000b.rf similarity index 100% rename from test/src/main/resources/v2_import_test/data/A000000b.rf rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/A000000b.rf diff --git a/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/distcp.txt b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/distcp.txt new file mode 100644 index 00000000000..c07955431fb --- /dev/null +++ b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/distcp.txt @@ -0,0 +1,24 @@ +==== + 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. +==== + +hdfs://localhost:8020/accumulo/tables/1/default_tablet/A000000b.rf +hdfs://localhost:8020/accumulo/tables/1/t-0000002/A000000a.rf +hdfs://localhost:8020/accumulo/tables/1/t-0000001/A0000009.rf +hdfs://localhost:8020/accumulo/tables/1/t-0000003/A0000008.rf +hdfs://localhost:8020/accumulo/export_test/exportMetadata.zip diff --git a/test/src/main/resources/v2_import_test/data/exportMetadata.zip b/test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/exportMetadata.zip similarity index 100% rename from test/src/main/resources/v2_import_test/data/exportMetadata.zip rename to test/src/main/resources/org/apache/accumulo/test/v2_import_test/data/exportMetadata.zip diff --git a/test/src/main/resources/v2_import_test/data/distcp.txt b/test/src/main/resources/v2_import_test/data/distcp.txt deleted file mode 100644 index 672c11fba8f..00000000000 --- a/test/src/main/resources/v2_import_test/data/distcp.txt +++ /dev/null @@ -1,5 +0,0 @@ -hdfs://localhost:8020/accumulo/tables/1/default_tablet/A000000b.rf -hdfs://localhost:8020/accumulo/tables/1/t-0000002/A000000a.rf -hdfs://localhost:8020/accumulo/tables/1/t-0000001/A0000009.rf -hdfs://localhost:8020/accumulo/tables/1/t-0000003/A0000008.rf -hdfs://localhost:8020/accumulo/export_test/exportMetadata.zip