ninja-fix: checkstyle fixes in VirtualTableTest, HistoryValidatorTest, SeedDefiner, RunStartDefiner, and Config

This commit is contained in:
Caleb Rackliffe 2023-09-27 16:27:05 -05:00 committed by David Capwell
parent c0a63c9164
commit 19fcbcab61
3 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,8 @@
package org.apache.cassandra.simulator.logging;
import accord.utils.Invariants;
import java.util.concurrent.TimeUnit;
import ch.qos.logback.core.PropertyDefinerBase;
import org.apache.cassandra.config.CassandraRelevantProperties;
@ -26,7 +27,8 @@ public class RunStartDefiner extends PropertyDefinerBase
{
static
{
Invariants.checkState(CassandraRelevantProperties.SIMULATOR_STARTED.getString() != null);
if (CassandraRelevantProperties.SIMULATOR_STARTED.getString() == null)
CassandraRelevantProperties.SIMULATOR_STARTED.setString(Long.toString(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
}
@Override

View File

@ -23,7 +23,6 @@ import org.apache.cassandra.config.CassandraRelevantProperties;
public class SeedDefiner extends PropertyDefinerBase
{
public static void setSeed(long seed)
{
CassandraRelevantProperties.SIMULATOR_SEED.setString("0x" + Long.toHexString(seed));

View File

@ -30,6 +30,7 @@ import java.util.regex.Pattern;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import org.apache.cassandra.config.CassandraRelevantProperties;
import org.junit.Assume;
import org.junit.FixMethodOrder;
import org.junit.Test;
@ -43,7 +44,6 @@ import com.carrotsearch.hppc.IntHashSet;
import com.carrotsearch.hppc.IntIntHashMap;
import com.carrotsearch.hppc.IntIntMap;
import com.carrotsearch.hppc.IntSet;
import org.apache.cassandra.config.CassandraRelevantProperties;
import com.carrotsearch.hppc.cursors.IntCursor;
import org.apache.cassandra.distributed.api.QueryResults;
import org.apache.cassandra.utils.Clock;