diff --git a/build.xml b/build.xml index 7184d7443e..b773f0fd3f 100644 --- a/build.xml +++ b/build.xml @@ -1279,6 +1279,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1354,19 +1389,11 @@ - - - - - - - Failed to set File Separator. This shouldn't happen. - - - - - - + + + + + @@ -1392,7 +1419,6 @@ - @@ -1417,7 +1443,6 @@ - @@ -1439,7 +1464,6 @@ - @@ -1484,16 +1508,16 @@ - - + + - - + + @@ -1709,13 +1733,12 @@ - @@ -1736,8 +1759,8 @@ - - + + @@ -1756,24 +1779,24 @@ - - + + - - + + - - + + diff --git a/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java b/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java deleted file mode 100644 index 0047f48e23..0000000000 --- a/test/unit/org/apache/cassandra/OffsetAwareConfigurationLoader.java +++ /dev/null @@ -1,67 +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 - *

- * http://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.cassandra; - -import org.apache.cassandra.config.Config; -import org.apache.cassandra.config.YamlConfigurationLoader; -import org.apache.cassandra.exceptions.ConfigurationException; - -import java.io.File; - - -public class OffsetAwareConfigurationLoader extends YamlConfigurationLoader -{ - - static final String OFFSET_PROPERTY = "cassandra.test.offsetseed"; - int offset = 0; - - public OffsetAwareConfigurationLoader() - { - String offsetStr = System.getProperty(OFFSET_PROPERTY); - - if (offsetStr == null) - throw new RuntimeException("offset property is not set: "+OFFSET_PROPERTY); - - offset = Integer.valueOf(offsetStr); - - assert offset >= 0; - } - - @Override - public Config loadConfig() throws ConfigurationException - { - Config config = super.loadConfig(); - - String sep = File.pathSeparator; - - config.rpc_port += offset; - config.native_transport_port += offset; - config.storage_port += offset; - - config.commitlog_directory += sep + offset; - config.saved_caches_directory += sep + offset; - config.hints_directory += sep + offset; - - config.cdc_raw_directory += sep + offset; - - for (int i = 0; i < config.data_file_directories.length; i++) - config.data_file_directories[i] += sep + offset; - - return config; - } -} diff --git a/test/unit/org/apache/cassandra/config/DatabaseDescriptorRefTest.java b/test/unit/org/apache/cassandra/config/DatabaseDescriptorRefTest.java index 6e865aed8a..1c07a7d88d 100644 --- a/test/unit/org/apache/cassandra/config/DatabaseDescriptorRefTest.java +++ b/test/unit/org/apache/cassandra/config/DatabaseDescriptorRefTest.java @@ -125,7 +125,6 @@ public class DatabaseDescriptorRefTest "org.apache.cassandra.utils.FBUtilities$1", "org.apache.cassandra.utils.CloseableIterator", "org.apache.cassandra.utils.Pair", - "org.apache.cassandra.OffsetAwareConfigurationLoader", "org.apache.cassandra.ConsoleAppender", "org.apache.cassandra.ConsoleAppender$1", "org.apache.cassandra.LogbackStatusListener",