mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
refactor to junit 5 latest and repoint dependencies
remove all testng references update annotations
This commit is contained in:
parent
d9113ea6f9
commit
3036f971a6
@ -80,14 +80,14 @@
|
||||
<!-- test only scope -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -21,7 +21,7 @@ package io.nosqlbench.activitytype.cql.datamappers.functions.long_string;
|
||||
|
||||
import io.nosqlbench.virtdata.annotations.Example;
|
||||
import io.nosqlbench.virtdata.annotations.ThreadSafeMapper;
|
||||
import io.nosqlbench.virtdata.api.VirtDataResources;
|
||||
import io.nosqlbench.nb.api.VirtDataResources;
|
||||
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_string.ModuloLineToString;
|
||||
import org.apache.commons.csv.CSVParser;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
|
@ -3,12 +3,13 @@ package com.datastax.ebdrivers.cql;
|
||||
import io.nosqlbench.activitytype.cql.core.CqlAction;
|
||||
import io.nosqlbench.activitytype.cql.core.CqlActivity;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class CqlActionTest {
|
||||
|
||||
@Test(enabled = false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testCqlAction() {
|
||||
ActivityDef ad = ActivityDef.parseActivityDef("driver=ebdrivers;alias=foo;yaml=write-telemetry.yaml;");
|
||||
CqlActivity cac = new CqlActivity(ad);
|
||||
|
@ -1,14 +1,13 @@
|
||||
package com.datastax.ebdrivers.cql.statements;
|
||||
|
||||
import io.nosqlbench.activitytype.cql.statements.core.CQLStatementDefParser;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CQLCQLStatementDefParserTest {
|
||||
|
||||
// TODO: Implment support for default values in yaml
|
||||
@ -59,4 +58,4 @@ public class CQLCQLStatementDefParserTest {
|
||||
assertThat(parseResult.getStatement()).isEqualTo("This is a test of ? and ?");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,11 +6,10 @@ import com.datastax.driver.core.SocketOptions;
|
||||
import com.datastax.driver.core.policies.LoadBalancingPolicy;
|
||||
import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
|
||||
import io.nosqlbench.activitytype.cql.core.CQLOptions;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CQLOptionsTest {
|
||||
|
||||
@Test
|
||||
@ -68,4 +67,4 @@ public class CQLOptionsTest {
|
||||
assertThat(po3.getHeartbeatIntervalSeconds()).isEqualTo(100);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,12 +30,6 @@
|
||||
|
||||
<!-- test scope only -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.mockito</groupId>-->
|
||||
<!--<artifactId>mockito-all</artifactId>-->
|
||||
@ -45,7 +39,13 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -4,7 +4,7 @@ import io.nosqlbench.engine.api.activityapi.core.Action;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
|
||||
import io.nosqlbench.engine.api.activityapi.core.SyncAction;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
/*
|
||||
* Copyright 2016 jshook
|
||||
|
@ -27,14 +27,14 @@
|
||||
<!-- test scope only -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -3,7 +3,7 @@ package io.nosqlbench.activitytype.http;
|
||||
import io.nosqlbench.engine.api.activityapi.core.Action;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
@ -27,14 +27,14 @@
|
||||
<!-- test scope only -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
package io.nosqlbench.activitytype.stdout;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StatementFormattersTest {
|
||||
|
||||
@Test
|
||||
@ -56,4 +55,4 @@ public class StatementFormattersTest {
|
||||
assertThat(csv).isEqualTo("alpha : {alpha}\n beta : {beta}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ package io.nosqlbench.activitytype.stdout;
|
||||
import io.nosqlbench.engine.api.activityapi.core.Action;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -28,6 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Created by sebastianestevez on 5/5/17.
|
||||
*/
|
||||
public class StdoutActivityTypeTest {
|
||||
|
||||
@Test
|
||||
public void testDiagActivity() {
|
||||
StdoutActivityType stdoutAt = new StdoutActivityType();
|
||||
|
@ -34,15 +34,9 @@
|
||||
|
||||
<!-- test scope only -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -15,18 +15,6 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-processors</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-annotations</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>nb-api</artifactId>
|
||||
@ -38,22 +26,22 @@
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- test -->
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- jetty -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
@ -127,11 +115,6 @@
|
||||
<!-- <artifactId>virtdata-api</artifactId>-->
|
||||
<!-- <version>3.12.73-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.docsys.api;
|
||||
|
||||
import io.nosqlbench.virtdata.api.VirtDataResources;
|
||||
import io.nosqlbench.nb.api.VirtDataResources;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
@ -1,2 +1 @@
|
||||
io.nosqlbench.virtdata.processors.FunctionDocInfoProcessor
|
||||
io.nosqlbench.nb.api.processors.ServiceProcessor
|
||||
|
@ -2,8 +2,6 @@ package io.nosqlbench.docsys.core;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class DocsysMarkdownEndpointTest {
|
||||
|
||||
@Test
|
||||
@ -12,4 +10,4 @@ public class DocsysMarkdownEndpointTest {
|
||||
String markdownList = ep.getMarkdownList(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
package io.nosqlbench.docsys.core;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class PathWalkerTest {
|
||||
|
||||
}
|
@ -19,6 +19,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>nb-api</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-userlibs</artifactId>
|
||||
@ -93,14 +99,13 @@
|
||||
<!-- test scope only -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.docsys.core.PathWalker;
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.Scenarios;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import io.nosqlbench.virtdata.api.VirtDataResources;
|
||||
import io.nosqlbench.nb.api.VirtDataResources;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
package io.nosqlbench.engine.api.activityapi;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ParameterMap;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@ -85,7 +85,7 @@ public class ParameterMapTest {
|
||||
assertThat(multiNames.get().getOptionalString("delta","gamma").orElse("missing")).isEqualTo("blue");
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = {RuntimeException.class}, expectedExceptionsMessageRegExp = ".*Multiple parameters are specified.*")
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testAmbiguousMultiValueThrowsException() {
|
||||
Optional<ParameterMap> multiNames = ParameterMap.parseParams("alpha=blue;beta=red;delta=blue");
|
||||
assertThat(multiNames).isPresent();
|
||||
@ -118,4 +118,4 @@ public class ParameterMapTest {
|
||||
public void testQuotedSemis() {
|
||||
ParameterMap abc = ParameterMap.parseOrException("a=1;b='two;three';");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,8 @@ import io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.SucceededOp
|
||||
import io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.EventedOpImpl;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.StartedOp;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.TrackedOp;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class OpTrackerImplTest {
|
||||
|
||||
@Test
|
||||
@ -20,4 +19,4 @@ public class OpTrackerImplTest {
|
||||
SucceededOp stop = started.succeed(23);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,13 +20,12 @@ package io.nosqlbench.engine.api.activityapi.cyclelog;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultsSegment;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultSegmentBuffer;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleResultsArraySegmentReadableTest {
|
||||
|
||||
@Test
|
||||
@ -49,4 +48,4 @@ public class CycleResultsArraySegmentReadableTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultsSegment;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results_rle.CycleResultsRLEBufferReadable;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results_rle.CycleResultsRLEBufferTarget;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
@ -30,7 +30,6 @@ import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test(singleThreaded = true)
|
||||
public class CycleResultsRLEBufferReadableTest {
|
||||
|
||||
@Test
|
||||
@ -112,4 +111,4 @@ public class CycleResultsRLEBufferReadableTest {
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,14 +20,13 @@ package io.nosqlbench.engine.api.activityapi.cyclelog.buffers;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results_rle.CycleResultsRLEBufferReadable;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results_rle.CycleResultsRLEBufferTarget;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleResultsRLEBufferTargetTest {
|
||||
|
||||
@Test
|
||||
@ -53,6 +52,7 @@ public class CycleResultsRLEBufferTargetTest {
|
||||
assertThat(resultValues).containsExactly(0,1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGappedIntervalRLEEncoding() {
|
||||
CycleResultsRLEBufferTarget tb = new CycleResultsRLEBufferTarget(100000);
|
||||
|
||||
@ -102,4 +102,4 @@ public class CycleResultsRLEBufferTargetTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleResultArraySegmentBufferTest {
|
||||
|
||||
@Test
|
||||
@ -43,4 +42,4 @@ public class CycleResultArraySegmentBufferTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,10 @@
|
||||
package io.nosqlbench.engine.api.activityapi.cyclelog.filters.tristate;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.ResultReadable;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class EnumReadableMappingFilterTest {
|
||||
|
||||
@Test
|
||||
@ -66,4 +65,4 @@ public class EnumReadableMappingFilterTest {
|
||||
return resultCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,21 +19,20 @@ package io.nosqlbench.engine.api.activityapi.cyclelog.inputs.cyclelog;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogOutput;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleLogInputTest {
|
||||
|
||||
private final static String filepath="cycle-log-reader-test";
|
||||
private File cyclefile;
|
||||
private static File cyclefile;
|
||||
|
||||
@BeforeClass
|
||||
public void createTempFile() {
|
||||
public static void createTempFile() {
|
||||
try {
|
||||
cyclefile = File.createTempFile(filepath, "cyclelog");
|
||||
System.out.println("tmp file for testing:" + cyclefile.getPath());
|
||||
@ -73,8 +72,6 @@ public class CycleLogInputTest {
|
||||
c = i1.nextCycle();
|
||||
assertThat(c).isEqualTo(5L);
|
||||
assertThat(i1.isExhausted()).isTrue();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -22,13 +22,12 @@ import io.nosqlbench.engine.api.activityapi.cyclelog.filters.CoreResultValueFilt
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.filters.ResultFilterDispenser;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.filters.ResultValueFilterType;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.MutableCycleResult;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CoreResultFilterTest {
|
||||
|
||||
@Test
|
||||
@ -47,4 +46,4 @@ public class CoreResultFilterTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.ResultReada
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.filters.tristate.ResultFilteringSieve;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.filters.tristate.TristateFilter;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.MutableCycleResult;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -31,7 +31,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ResultFilteringSieveTest {
|
||||
|
||||
@Test
|
||||
@ -58,6 +57,7 @@ public class ResultFilteringSieveTest {
|
||||
assertThat(sieve.apply(new MutableCycleResult(3L,10))).isEqualTo(TristateFilter.Policy.Keep);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPredicateConversions() {
|
||||
MutableCycleResult c1 = new MutableCycleResult(1,1);
|
||||
MutableCycleResult c2 = new MutableCycleResult(2,2);
|
||||
@ -89,4 +89,4 @@ public class ResultFilteringSieveTest {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.errorhandling;
|
||||
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.ArrayList;
|
||||
@ -27,17 +27,16 @@ import java.util.Set;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test(singleThreaded = true)
|
||||
public class HashedErrorHandlerTest {
|
||||
|
||||
HashedErrorHandler<Throwable, Boolean> handler;
|
||||
|
||||
@BeforeMethod
|
||||
@Before
|
||||
public void beforeTest() {
|
||||
handler = new HashedErrorHandler<Throwable,Boolean>();
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*actually.*")
|
||||
@Test(expected= RuntimeException.class)
|
||||
public void testDefaultHandlerThrowsException() {
|
||||
handler.handleError(1L, new InvalidParameterException("this is an invalid exception, actually"));
|
||||
}
|
||||
@ -92,7 +91,7 @@ public class HashedErrorHandlerTest {
|
||||
assertThat(result).isFalse();
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = RuntimeException.class,expectedExceptionsMessageRegExp = ".*this is an error.*")
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testNamedGroup() {
|
||||
handler.setGroup("test1",IndexOutOfBoundsException.class,ArrayIndexOutOfBoundsException.class);
|
||||
handler.setGroup("types",InvalidParameterException.class);
|
||||
@ -103,20 +102,20 @@ public class HashedErrorHandlerTest {
|
||||
handler.handleError(5L,new InvalidParameterException("this is an error"));
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = RuntimeException.class,expectedExceptionsMessageRegExp = ".*Found 2.*")
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testFindVagueSingleSubmatchException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
handler.setHandlerForPattern("Index", CycleErrorHandlers.rethrow("12345 678910 11 12"));
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = RuntimeException.class,expectedExceptionsMessageRegExp = ".*rethrown\\(Journey.*")
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testFindMultipleRegex() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
handler.setHandlerForPattern(".*Index.*", CycleErrorHandlers.rethrow("Journey through the klein bottle."));
|
||||
Boolean result = handler.handleError(9L, new IndexOutOfBoundsException("9L was out of bounds"));
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Found no matching.*")
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testNonMatchingSubstringException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
Set<Class<? extends Throwable>> groups = handler.getGroup("index");
|
||||
@ -126,7 +125,7 @@ public class HashedErrorHandlerTest {
|
||||
handler.setHandlerForPattern("Dyahwemo", CycleErrorHandlers.rethrow("Journey through the klein bottle."));
|
||||
}
|
||||
|
||||
@Test(expectedExceptions=RuntimeException.class,expectedExceptionsMessageRegExp = ".*Group name 'outdex' was not found.*")
|
||||
@Test(expected=RuntimeException.class)
|
||||
public void testSetHandlerForMissingGroupException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
handler.setHandlerForGroup("outdex", CycleErrorHandlers.rethrow("Journey through the klein bottle."));
|
||||
@ -140,4 +139,4 @@ public class HashedErrorHandlerTest {
|
||||
handler.resetAllClassHandlers();
|
||||
assertThat(handler.getHandlers()).hasSize(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class BucketSequencerTest {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.planning;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -17,9 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.planning;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.planning.ElementSequencer;
|
||||
import io.nosqlbench.engine.api.activityapi.planning.IntervalSequencer;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -27,7 +25,6 @@ import java.util.function.ToLongFunction;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class IntervalSequencerTest {
|
||||
|
||||
private static ElementSequencer<AnEvent> seqr = new IntervalSequencer<>();
|
@ -17,25 +17,27 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class RateSpecTest {
|
||||
|
||||
@Test
|
||||
public void testDefaultRateSpecPattern() {
|
||||
RateSpec r = new RateSpec("523");
|
||||
assertThat(r.getRate()).isEqualTo(523.0d);
|
||||
assertThat(r.getBurstRatio()).isEqualTo(1.1d);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBurstRatioPattern() {
|
||||
RateSpec r = new RateSpec("12345,1.3");
|
||||
assertThat(r.getRate()).isEqualTo(12345.0d);
|
||||
assertThat(r.getBurstRatio()).isEqualTo(1.3d);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeSelection() {
|
||||
RateSpec a = new RateSpec("12345,1.4,configure");
|
||||
assertThat(a.getVerb()).isEqualTo(RateSpec.Verb.configure);
|
||||
@ -44,4 +46,4 @@ public class RateSpecTest {
|
||||
RateSpec c = new RateSpec("12345,1.1");
|
||||
assertThat(c.verb== RateSpec.Verb.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,90 +20,104 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.testutils.Perf;
|
||||
import io.nosqlbench.testutils.Result;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@Test(singleThreaded = true, enabled = false)
|
||||
|
||||
public class TestHybridRateLimiterPerf {
|
||||
|
||||
private Function<RateSpec, RateLimiter> rlFunction = rs -> new HybridRateLimiter(ActivityDef.parseActivityDef("alias=tokenrl"),"hybrid", rs.withVerb(RateSpec.Verb.start));
|
||||
private RateLimiterPerfTestMethods methods = new RateLimiterPerfTestMethods();
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e9() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E9, 1.1),10_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e8() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E8, 1.1),50_000_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e7() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E7, 1.1),5_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e6() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E6, 1.1),500_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e5() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E5, 1.1),50_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e4() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E4, 1.1),5_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e3() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E3, 1.1),500,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e2() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E2, 1.1),50,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E1, 1.1),5,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e0() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E0, 1.1),2,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testePerf1eN1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E-1, 1.1),1,0.005d);
|
||||
System.out.println(result);
|
||||
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -115,7 +129,8 @@ public class TestHybridRateLimiterPerf {
|
||||
// 800000000_ops 60.616158_S 13197801.155_ops_s, 76_ns_op
|
||||
// JVM 11.0.1
|
||||
// 400000000_ops 33.622751_S 11896706.363_ops_s, 84_ns_op
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -134,7 +149,8 @@ public class TestHybridRateLimiterPerf {
|
||||
// 200000000_ops 15.915484_S 12566379.106_ops_s, 80_ns_op
|
||||
// 200000000_ops 17.691698_S 11304737.461_ops_s, 88_ns_op
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -146,7 +162,8 @@ public class TestHybridRateLimiterPerf {
|
||||
// 200000000_ops 16.744912_S 11943926.287_ops_s, 84_ns_op
|
||||
// 200000000_ops 17.474475_S 11445264.894_ops_s, 87_ns_op
|
||||
// 200000000_ops 14.089247_S 14195222.897_ops_s, 70_ns_op
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -159,7 +176,8 @@ public class TestHybridRateLimiterPerf {
|
||||
// 200000000_ops 10.624822_S 18823844.646_ops_s, 53_ns_op
|
||||
// JVM 11.0.1
|
||||
// 200000000_ops 11.839666_S 16892368.438_ops_s, 59_ns_op
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 40_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
@ -19,7 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.testutils.Perf;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@ -30,7 +31,6 @@ import java.util.function.Function;
|
||||
*
|
||||
* This set is for 10M ops/s at different levels of contention.
|
||||
*/
|
||||
@Test(singleThreaded = true, enabled=false)
|
||||
public class TestRateLimiterPerf1E7 {
|
||||
|
||||
private Function<RateSpec, RateLimiter> rlFunction = rs -> new HybridRateLimiter(ActivityDef.parseActivityDef("alias=tokenrl"),"hybrid", rs.withVerb(RateSpec.Verb.configure));
|
||||
@ -39,6 +39,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 160 threads at 10_000_000 ops/s
|
||||
// JVM 11.0.1
|
||||
// 160000000_ops 18.122886_S 8828615.971_ops_s, 113_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -47,6 +49,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 80 threads at 10_000_000 ops/s
|
||||
// JVM 11.0.1
|
||||
// 80000000_ops 8.354648_S 9575507.945_ops_s, 104_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -55,6 +59,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 40 threads at 10_000_000 ops/s
|
||||
// JVM 11.0.1
|
||||
// 40000000_ops 4.001661_S 9995849.116_ops_s, 100_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -63,6 +69,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 20 threads at 10_000_000 ops/s
|
||||
// JVM 11.0.1
|
||||
// 20000000_ops 1.914366_S 10447323.063_ops_s, 96_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 10), 20_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -75,6 +83,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 100000000_ops 9.842758_S 10159754.498_ops_s, 98_ns_op
|
||||
// 100000000_ops 10.123873_S 9877642.338_ops_s, 101_ns_op
|
||||
// 100000000_ops 10.078673_S 9921941.517_ops_s, 101_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -88,6 +98,8 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 50000000_ops 4.924924_S 10152441.416_ops_s, 98_ns_op
|
||||
// 200000000_ops 19.761154_S 10120866.172_ops_s, 99_ns_op
|
||||
// 200000000_ops 19.928625_S 10035815.505_ops_s, 100_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test10Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
@ -19,7 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.testutils.Perf;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@ -30,7 +31,6 @@ import java.util.function.Function;
|
||||
*
|
||||
* This set is for 100M ops/s at different levels of contention.
|
||||
*/
|
||||
@Test(singleThreaded = true, enabled=false)
|
||||
public class TestRateLimiterPerf1E8 {
|
||||
|
||||
private Function<RateSpec, RateLimiter> rlFunction = rs -> new HybridRateLimiter(ActivityDef.parseActivityDef("alias=tokenrl"),"hybrid", rs.withVerb(RateSpec.Verb.configure));
|
||||
@ -43,6 +43,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 1600000000_ops 159.234501_S 10_048_073.673_ops_s, 100_ns_op
|
||||
// 1600000000_ops 158.224286_S 10_112_227.620_ops_s, 99_ns_op
|
||||
//
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -52,6 +54,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// JVM 11.0.1, Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
|
||||
// 800000000_ops 74.104295_S 10795595.534_ops_s, 93_ns_op
|
||||
// 800000000_ops 74.155495_S 10788141.933_ops_s, 93_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -63,6 +67,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 800000000_ops 60.616158_S 13197801.155_ops_s, 76_ns_op
|
||||
// JVM 11.0.1, Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
|
||||
// 400000000_ops 33.622751_S 11896706.363_ops_s, 84_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -81,6 +87,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 200000000_ops 15.915484_S 12566379.106_ops_s, 80_ns_op
|
||||
// 200000000_ops 17.691698_S 11304737.461_ops_s, 88_ns_op
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -95,6 +103,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// JVM 11.0.1, Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
|
||||
// 100000000_ops 7.751758_S 12900299.587_ops_s, 78_ns_op
|
||||
// 100000000_ops 7.864851_S 12714799.657_ops_s, 79_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@ -110,6 +120,8 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 50000000_ops 2.390485_S 20916254.150_ops_s, 48_ns_op
|
||||
// 100000000_ops 6.317008_S 15830279.182_ops_s, 63_ns_op
|
||||
// 200000000_ops 13.551712_S 14758282.931_ops_s, 68_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
public void test100Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
@ -19,7 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.testutils.Result;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@ -30,73 +31,83 @@ import java.util.function.Function;
|
||||
*
|
||||
* This set is for single-threaded (uncontended) baselines, at different op rates.
|
||||
*/
|
||||
@Test(singleThreaded = true, enabled=false)
|
||||
public class TestRateLimiterPerfSingle {
|
||||
|
||||
private Function<RateSpec, RateLimiter> rlFunction = rs -> new HybridRateLimiter(ActivityDef.parseActivityDef("alias=tokenrl"),"hybrid", rs.withVerb(RateSpec.Verb.start));
|
||||
private RateLimiterPerfTestMethods methods = new RateLimiterPerfTestMethods();
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e9() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E9, 1.1),10_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e8() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E8, 1.1),50_000_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e7() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E7, 1.1),5_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e6() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E6, 1.1),500_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e5() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E5, 1.1),50_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e4() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E4, 1.1),5_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e3() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E3, 1.1),500,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e2() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E2, 1.1),50,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E1, 1.1),5,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testPerf1e0() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E0, 1.1),2,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testePerf1eN1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E-1, 1.1),1,0.005d);
|
||||
System.out.println(result);
|
||||
|
@ -17,13 +17,14 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class TokenPoolTest {
|
||||
|
||||
@Test
|
||||
public void testBackfillFullRate() {
|
||||
TokenPool p = new TokenPool(100, 1.1);
|
||||
assertThat(p.refill(100L)).isEqualTo(100L);
|
||||
@ -37,7 +38,7 @@ public class TokenPoolTest {
|
||||
assertThat(p.takeUpTo(100)).isEqualTo(100L);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTakeRanges() {
|
||||
TokenPool p = new TokenPool(100, 10);
|
||||
p.refill(100);
|
||||
@ -60,4 +61,4 @@ public class TokenPoolTest {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,16 +17,17 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.sysperf;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test(enabled=false)
|
||||
public class SysPerfBaselinerTest {
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSysOpsNanoTime() {
|
||||
SysPerfBaseliner sbo = new SysPerfBaseliner();
|
||||
SysPerfData perfdata = sbo.getSysPerfData();
|
||||
System.out.println(perfdata);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,16 +17,18 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.sysperf;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.file.attribute.FileTime;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test(singleThreaded = true, enabled = false)
|
||||
public class SysPerfTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testForcedBench() {
|
||||
|
||||
// SysPerf.get().reset();
|
||||
@ -51,4 +53,4 @@ public class SysPerfTest {
|
||||
assertThat(run2Time).isEqualTo(run3Time);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityconfig;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -35,4 +35,4 @@ public class MultiMapLookupTest {
|
||||
MultiMapLookup mml = new MultiMapLookup(m1, m2);
|
||||
assertThat(mml.get("a")).isEqualTo("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,19 +21,19 @@ import io.nosqlbench.virtdata.api.DataMapper;
|
||||
import io.nosqlbench.virtdata.api.VirtData;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class BindingEscapingTest {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(BindingEscapingTest.class);
|
||||
|
||||
@Test
|
||||
public void testEscapedBindings() {
|
||||
DataMapper<String> mapper = VirtData.getMapper("Template('\"-{}-\"Func(234)\\\"\\)',NumberNameToString());'",String.class);
|
||||
String s = mapper.get(234);
|
||||
assertThat(s).isEqualTo("\"-two hundred and thirty four-\"Func(234)\\\"\\)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -24,16 +24,16 @@ import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDoc;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class RawStmtDefDefsTest {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(RawStmtDefDefsTest.class);
|
||||
|
||||
@Test
|
||||
public void testLayering() {
|
||||
|
||||
@ -78,4 +78,4 @@ public class RawStmtDefDefsTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,13 +19,12 @@ package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class RawYamlStatementLoaderTest {
|
||||
private final static Logger logger = LoggerFactory.getLogger(RawYamlStatementLoaderTest.class);
|
||||
|
||||
@ -76,8 +75,6 @@ public class RawYamlStatementLoaderTest {
|
||||
RawStmtsBlock rawStmtsBlock = blocks.get(0);
|
||||
assertThat(rawStmtsBlock.getName()).isEqualTo("block0");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,23 +22,22 @@ import io.nosqlbench.engine.api.activityconfig.yaml.StmtDef;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsBlock;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDoc;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import org.junit.BeforeClass;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StmtEscapingTest {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(StmtEscapingTest.class);
|
||||
private static List<StmtDef> defs;
|
||||
|
||||
@BeforeClass
|
||||
public void testLayering() {
|
||||
public static void testLayering() {
|
||||
|
||||
StmtsDocList all = StatementsLoader.load(logger, "testdocs/escaped_stmts.yaml");
|
||||
assertThat(all).isNotNull();
|
||||
@ -56,19 +55,22 @@ public class StmtEscapingTest {
|
||||
defs = block1.getStmts();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBackslashEscape() {
|
||||
String s1 = defs.get(0).getStmt();
|
||||
assertThat(s1).isEqualTo("This is a \"statement\"");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBackslashInBlock() {
|
||||
String s2 = defs.get(1).getStmt();
|
||||
assertThat(s2).isEqualTo("This is a \\\"statement\\\".\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTripleQuotesInBlock() {
|
||||
String s3 = defs.get(2).getStmt();
|
||||
assertThat(s3).isEqualTo("This is a \"\"\"statement\"\"\".\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,15 +17,15 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StmtVariationTests {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(StmtVariationTests.class);
|
||||
@ -93,6 +93,7 @@ public class StmtVariationTests {
|
||||
assertThat(stmts.get(1).getStmt()).isEqualTo("statement two");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMixedForms() {
|
||||
RawYamlStatementLoader ysl = new RawYamlStatementLoader();
|
||||
RawStmtsDocList docs = ysl.loadString(logger,
|
||||
|
@ -19,24 +19,23 @@ package io.nosqlbench.engine.api.activityconfig.yaml;
|
||||
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.ParsedStmt;
|
||||
import org.junit.BeforeClass;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ParsedStmtTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ParsedStmtTest.class);
|
||||
|
||||
private StmtsDocList doclist;
|
||||
private static StmtsDocList doclist;
|
||||
|
||||
@BeforeClass
|
||||
public void testLoadYaml() {
|
||||
public static void testLoadYaml() {
|
||||
doclist = StatementsLoader.load(logger, "testdocs/bindings.yaml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasicParser() {
|
||||
StmtsBlock block0 = doclist.getStmtDocs().get(0).getBlocks().get(0);
|
||||
StmtDef stmtDef0 = block0.getStmts().get(0);
|
||||
@ -53,6 +52,7 @@ public class ParsedStmtTest {
|
||||
assertThat(parsed1.hasError()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleBindingUsage() {
|
||||
StmtsBlock block2 = doclist.getStmtDocs().get(0).getBlocks().get(2);
|
||||
|
||||
@ -67,7 +67,7 @@ public class ParsedStmtTest {
|
||||
assertThat(parsed1.hasError()).isFalse();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testQuestionMarkAnchors() {
|
||||
StmtsBlock block2 = doclist.getStmtDocs().get(0).getBlocks().get(3);
|
||||
|
||||
@ -81,8 +81,6 @@ public class ParsedStmtTest {
|
||||
assertThat(parsed1.getMissingBindings().isEmpty());
|
||||
assertThat(parsed1.hasError()).isFalse();
|
||||
assertThat(parsed1.getSpecificBindings()).containsOnlyKeys("alpha");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,24 +18,18 @@
|
||||
package io.nosqlbench.engine.api.activityconfig.yaml;
|
||||
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import org.junit.BeforeClass;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StmtDetailOverrideTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(StmtDetailOverrideTest.class);
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public void testLoadYaml() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStmtOverrides() {
|
||||
|
||||
@ -89,6 +83,5 @@ public class StmtDetailOverrideTest {
|
||||
assertThat(s.getBindings()).hasSize(1);
|
||||
assertThat(s.getParams()).hasSize(1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ package io.nosqlbench.engine.api.activityconfig.yaml;
|
||||
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import org.assertj.core.data.MapEntry;
|
||||
import org.junit.BeforeClass;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@ -30,11 +30,10 @@ import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StmtsDocListTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(StmtsDocListTest.class);
|
||||
|
||||
private StmtsDocList doclist;
|
||||
private static final Logger logger = LoggerFactory.getLogger(StmtsDocListTest.class);
|
||||
private static StmtsDocList doclist;
|
||||
|
||||
private LinkedHashMap<String, String> doc0bindings = new LinkedHashMap<String, String>() {{
|
||||
put("b2", "b2d");
|
||||
@ -51,7 +50,7 @@ public class StmtsDocListTest {
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public void testLoadYaml() {
|
||||
public static void testLoadYaml() {
|
||||
doclist = StatementsLoader.load(logger, "testdocs/docs_blocks_stmts.yaml");
|
||||
}
|
||||
|
||||
@ -134,4 +133,4 @@ public class StmtsDocListTest {
|
||||
assertThat(stmts).hasSize(2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,11 +17,10 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ActivityDefTest {
|
||||
|
||||
@Test
|
||||
@ -39,4 +38,4 @@ public class ActivityDefTest {
|
||||
assertThat(d.getCycleCount()).isEqualTo(4000000);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@ -32,4 +32,4 @@ public class CpuInfoTest {
|
||||
System.out.println(procDetails.get());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityimpl.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -32,4 +32,4 @@ public class AtomicInputTest {
|
||||
assertThat(inputSegment).isNull();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,11 +19,10 @@ package io.nosqlbench.engine.api.activityimpl.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleArray;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleArrayBufferTest {
|
||||
|
||||
@Test
|
||||
@ -45,4 +44,4 @@ public class CycleArrayBufferTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,11 +19,10 @@ package io.nosqlbench.engine.api.activityimpl.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleArray;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CycleArrayTest {
|
||||
|
||||
@Test
|
||||
@ -57,4 +56,4 @@ public class CycleArrayTest {
|
||||
assertThat(s3).isNull();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,10 @@
|
||||
package io.nosqlbench.engine.api.activityimpl.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class InputIntervalTest {
|
||||
|
||||
@Test
|
||||
@ -50,4 +49,4 @@ public class InputIntervalTest {
|
||||
assertThat(ii.getInputSegment(1)).isNull();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityimpl.marker;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultsSegment;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -28,7 +28,6 @@ import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ByteTrackerExtentTest {
|
||||
|
||||
@Test
|
||||
@ -78,4 +77,4 @@ public class ByteTrackerExtentTest {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl.marker;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class CoreOutputAtticTest {
|
||||
|
||||
@Test
|
||||
@ -143,4 +142,4 @@ public class CoreOutputAtticTest {
|
||||
// }
|
||||
//
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResult
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultSegmentBuffer;
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleResultsSegment;
|
||||
import io.nosqlbench.engine.api.activityapi.output.Output;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -29,7 +29,6 @@ import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class CoreOutputTest {
|
||||
|
||||
@Test
|
||||
@ -67,4 +66,4 @@ public class CoreOutputTest {
|
||||
this.segments.add(segment);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl.motor;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ParamsParserTest {
|
||||
|
||||
@Test
|
||||
|
@ -2,11 +2,11 @@ package io.nosqlbench.engine.api.activityimpl.tracking;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.marker.longheap.LongTreeTracker;
|
||||
import io.nosqlbench.engine.api.activityimpl.marker.longheap.LongTreeTrackerAtomic;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class LongTreeTrackerTest2 {
|
||||
|
||||
// @Test
|
||||
@ -58,6 +58,7 @@ public class LongTreeTrackerTest2 {
|
||||
assertThat(t.getHighestCompleted()).isEqualTo(9L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTotalCompleted() {
|
||||
LongTreeTracker t;
|
||||
|
||||
@ -137,7 +138,8 @@ public class LongTreeTrackerTest2 {
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void speedcheckThreadLocal() {
|
||||
long t1=System.nanoTime();
|
||||
LongTreeTracker t = new LongTreeTracker();
|
||||
@ -156,7 +158,8 @@ public class LongTreeTrackerTest2 {
|
||||
System.out.format("rate/s: %f\n", rate * 1000.0d);
|
||||
}
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void speedcheckConcurrentLocal() {
|
||||
long t1=System.nanoTime();
|
||||
LongTreeTracker t = new LongTreeTrackerAtomic();
|
||||
@ -175,4 +178,4 @@ public class LongTreeTrackerTest2 {
|
||||
System.out.format("rate/s: %f\n", rate * 1000.0d);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.api.activityimpl.tracking;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.marker.longheap.TreeTracker1024;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -18,4 +18,4 @@ public class TreeTracker1024Test {
|
||||
tt.setPosition(1023);
|
||||
// assertThat(tt.isCycleCompleted()).isTrue().as("cycle: 1023");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.Metric;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -55,4 +55,4 @@ public class ActivityMetricsTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.Snapshot;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class DeltaHdrHistogramReservoirTest {
|
||||
|
||||
// @Test
|
||||
@ -51,4 +50,4 @@ public class DeltaHdrHistogramReservoirTest {
|
||||
Snapshot snapshot = dhhr.getSnapshot();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ package io.nosqlbench.engine.api.metrics;
|
||||
import org.HdrHistogram.EncodableHistogram;
|
||||
import org.HdrHistogram.Histogram;
|
||||
import org.HdrHistogram.HistogramLogReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -30,7 +30,6 @@ import java.util.regex.Pattern;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class HistoIntervalLoggerTest {
|
||||
|
||||
@Test
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -59,4 +59,4 @@ public class NicerHistogramTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,13 @@ package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.ExponentiallyDecayingReservoir;
|
||||
import com.codahale.metrics.Snapshot;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class TestHistoTypes {
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void compareHistos() {
|
||||
Clock c = new Clock();
|
||||
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
package io.nosqlbench.engine.api.scripting;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class NashornEvaluatorTest {
|
||||
|
||||
@Test
|
||||
@ -49,4 +48,4 @@ public class NashornEvaluatorTest {
|
||||
assertThat(result).isEqualTo("afirstnamealastname");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,13 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class NBFilesTest {
|
||||
|
||||
@Test
|
||||
|
@ -1,21 +0,0 @@
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class NBPathWalkerTest {
|
||||
|
||||
// @Test
|
||||
// public void testBasicPathmatching() {
|
||||
// List<Path> found = NBPathWalker.findEndMatching(
|
||||
// Path.of("testdocs"),
|
||||
// Path.of("identity.yaml")
|
||||
// );
|
||||
//
|
||||
// assertThat(found).containsExactly(Path.of("flsd"));
|
||||
// }
|
||||
}
|
@ -17,11 +17,10 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class SimpleConfigTest {
|
||||
|
||||
@Test
|
||||
@ -30,4 +29,4 @@ public class SimpleConfigTest {
|
||||
assertThat(c.getString("a")).contains("1");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -26,7 +26,6 @@ import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class StrInterpolatorTest {
|
||||
|
||||
private static List<Map<String, String>> abcd = new ArrayList<Map<String, String>>() {{
|
||||
@ -120,4 +119,4 @@ public class StrInterpolatorTest {
|
||||
assertThat(a).isEqualTo("'Key': 'Value'.'Stuff'");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,13 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class TagFilterTest {
|
||||
|
||||
@Test
|
||||
@ -153,4 +152,4 @@ public class TagFilterTest {
|
||||
assertThat(tf.matches(itemtags).matched()).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,10 @@
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class UnitParserTests {
|
||||
|
||||
@Test
|
||||
@ -77,4 +76,4 @@ public class UnitParserTests {
|
||||
assertThat(Unit.bytesFor("1KiB").get()).isCloseTo(1024.0D,Offset.offset(0.00001D));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
package io.nosqlbench.testutils;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class BoundsTest {
|
||||
|
||||
@Test
|
||||
public void testProgression2() {
|
||||
Bounds bounds = new Bounds(3000, 2);
|
||||
assertThat(bounds.getValue()).isEqualTo(3000L);
|
||||
@ -35,6 +35,7 @@ public class BoundsTest {
|
||||
assertThat(bounds.getNextValue()).isEqualTo(15000L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProgression1() {
|
||||
Bounds bounds = new Bounds(100, 1);
|
||||
assertThat(bounds.getValue()).isEqualTo(100L);
|
||||
@ -45,4 +46,4 @@ public class BoundsTest {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.testutils;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -40,4 +40,4 @@ public class PerfTest {
|
||||
assertThat(p.isConverged(Result::getOpsPerSec,0.2d, 3)).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -26,12 +26,6 @@
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
@ -40,7 +34,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -20,7 +20,7 @@ package io.nosqlbench.engine.cli;
|
||||
|
||||
import io.nosqlbench.engine.cli.NBCLIOptions;
|
||||
import io.nosqlbench.engine.cli.NBCLIScriptAssembly;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
@ -17,11 +17,10 @@
|
||||
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class SessionNamerTest {
|
||||
|
||||
@Test
|
||||
@ -33,6 +32,7 @@ public class SessionNamerTest {
|
||||
assertThat(name2).matches("scenario_\\d{8}_\\d{6}_\\d{3}");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomFormat() {
|
||||
SessionNamer namer = new SessionNamer();
|
||||
String name1 = namer.format("Custom_session_name");
|
||||
@ -42,4 +42,4 @@ public class SessionNamerTest {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,17 @@
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import io.nosqlbench.docsys.core.PathWalker;
|
||||
import io.nosqlbench.virtdata.api.VirtDataResources;
|
||||
import org.testng.annotations.Test;
|
||||
import io.nosqlbench.nb.api.VirtDataResources;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class TestNBCLIOptions {
|
||||
|
||||
@Test
|
||||
@ -68,7 +66,7 @@ public class TestNBCLIOptions {
|
||||
assertThat(opts.wantsActivityTypes()).isFalse();
|
||||
opts = new NBCLIOptions(new String[]{"--list-drivers"});
|
||||
assertThat(opts.wantsActivityTypes()).isTrue();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -88,7 +86,7 @@ public class TestNBCLIOptions {
|
||||
assertThat(opts.wantsTopicalHelp()).isFalse();
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = {InvalidParameterException.class}, expectedExceptionsMessageRegExp = ".*unrecognized option.*")
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
public void shouldErrorSanelyWhenNoMatch() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"unrecognizable command"});
|
||||
}
|
||||
@ -103,14 +101,12 @@ public class TestNBCLIOptions {
|
||||
assertThat(cmd.getCmdArgs().get("param1")).isEqualTo("value1");
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = {InvalidParameterException.class},
|
||||
expectedExceptionsMessageRegExp = ".*script name must precede.*")
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
public void testShouldErrorSanelyWhenScriptNameSkipped() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"script", "param1=value1"});
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = {InvalidParameterException.class},
|
||||
expectedExceptionsMessageRegExp = ".*script name not found.*")
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
public void testShouldErrorForMissingScriptName() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"script"});
|
||||
}
|
||||
@ -158,7 +154,7 @@ public class TestNBCLIOptions {
|
||||
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = InvalidParameterException.class)
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
public void shouldThrowErrorForInvalidStopActivity() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "stop", "woah=woah" });
|
||||
List<NBCLIOptions.Cmd> cmds = opts.getCommands();
|
||||
@ -173,7 +169,7 @@ public class TestNBCLIOptions {
|
||||
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = InvalidParameterException.class)
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
public void shouldThrowErrorForInvalidAwaitActivity() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "await", "awaitme=notvalid" });
|
||||
List<NBCLIOptions.Cmd> cmds = opts.getCommands();
|
||||
@ -189,14 +185,13 @@ public class TestNBCLIOptions {
|
||||
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = NumberFormatException.class)
|
||||
@Test(expected = NumberFormatException.class)
|
||||
public void shouldThrowErrorForInvalidWaitMillisOperand() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "waitmillis", "noway" });
|
||||
List<NBCLIOptions.Cmd> cmds = opts.getCommands();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void listWorkloads() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "--list-workloads"});
|
||||
|
@ -63,12 +63,6 @@
|
||||
|
||||
<!-- only testing scope -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.mockito</groupId>-->
|
||||
<!--<artifactId>mockito-all</artifactId>-->
|
||||
@ -78,10 +72,15 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- only compile scope -->
|
||||
|
||||
</dependencies>
|
||||
|
@ -15,7 +15,7 @@ import io.nosqlbench.engine.api.activityimpl.motor.CoreMotorDispenser;
|
||||
import io.nosqlbench.engine.core.ActivityExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@ -35,7 +35,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@Test(enabled=true)
|
||||
public class ActivityExecutorTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ActivityExecutorTest.class);
|
||||
|
||||
@ -61,8 +60,7 @@ public class ActivityExecutorTest {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test(enabled=true)
|
||||
@Test
|
||||
public void testNewActivityExecutor() {
|
||||
ActivityDef ad = ActivityDef.parseActivityDef("driver=diag;alias=test;cycles=1000;");
|
||||
Optional<ActivityType> activityType = ActivityType.FINDER.get(ad.getActivityType());
|
||||
@ -98,8 +96,8 @@ public class ActivityExecutorTest {
|
||||
|
||||
}
|
||||
|
||||
private MotorDispenser getActivityMotorFactory(final ActivityDef ad, Action lc, final Input ls) {
|
||||
MotorDispenser<?> cmf = new MotorDispenser() {
|
||||
private MotorDispenser<?> getActivityMotorFactory(final ActivityDef ad, Action lc, final Input ls) {
|
||||
MotorDispenser<?> cmf = new MotorDispenser<>() {
|
||||
@Override
|
||||
public Motor getMotor(ActivityDef activityDef, int slotId) {
|
||||
Activity activity = new SimpleActivity(activityDef);
|
||||
|
@ -5,7 +5,7 @@ import io.nosqlbench.engine.core.fortesting.BlockingSegmentInput;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.activityimpl.SimpleActivity;
|
||||
import io.nosqlbench.engine.api.activityimpl.motor.CoreMotor;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicLongArray;
|
||||
@ -27,7 +27,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@Test
|
||||
public class CoreMotorTest {
|
||||
|
||||
@Test
|
||||
@ -130,4 +129,4 @@ public class CoreMotorTest {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package io.nosqlbench.core;
|
||||
|
||||
import io.nosqlbench.engine.api.scripting.ScriptEnvBuffer;
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ -31,4 +31,4 @@ public class ScenarioTest {
|
||||
assertThat(env.getIOLog().get().get(0)).contains("loaded script environment...");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.api.scripting.ScriptEnvBuffer;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -30,4 +30,4 @@ public class ScenarioContextBufferTest {
|
||||
assertThat(seb.getStdoutText()).isEqualTo("out\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,13 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@Test
|
||||
public class ScenariosExecutorTest {
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testAwaitOnTime() {
|
||||
ScenariosExecutor e = new ScenariosExecutor(ScenariosExecutorTest.class.getSimpleName(), 1);
|
||||
Scenario s = new Scenario("testing");
|
||||
@ -34,4 +35,4 @@ public class ScenariosExecutorTest {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -26,14 +26,14 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -55,7 +55,6 @@
|
||||
<slf4j.version>1.7.29</slf4j.version>
|
||||
<snakeyaml.version>1.23</snakeyaml.version>
|
||||
<snappy.version>1.1.2.6</snappy.version>
|
||||
<testng.version>6.13.1</testng.version>
|
||||
|
||||
<!-- plugin versions -->
|
||||
<antlr4.plugin.version>4.8</antlr4.plugin.version>
|
||||
@ -75,6 +74,7 @@
|
||||
<shade.plugin.version>3.2.1</shade.plugin.version>
|
||||
<source.plugin.version>3.0.1</source.plugin.version>
|
||||
<surefire.plugin.version>3.0.0-M4</surefire.plugin.version>
|
||||
<assertj.version>3.15.0</assertj.version>
|
||||
</properties>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@ -415,23 +415,12 @@
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>${testng.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<version>${assertj.java8.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.jupiter.version}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.assertj</groupId>-->
|
||||
<!-- <artifactId>assertj-core</artifactId>-->
|
||||
<!-- <version>${assertj.java8.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
@ -439,6 +428,12 @@
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
@ -62,16 +62,23 @@
|
||||
<!-- unit testing -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- TODO: Move this down to virtdata if it is the only module group using it -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -15,7 +15,7 @@
|
||||
* /
|
||||
*/
|
||||
|
||||
package io.nosqlbench.virtdata.api;
|
||||
package io.nosqlbench.nb.api;
|
||||
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVParser;
|
@ -96,14 +96,14 @@
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -17,13 +17,12 @@
|
||||
|
||||
package io.nosqlbench.cli.testing;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class ExitStatusIntegrationTests {
|
||||
|
||||
private final static String JARNAME = "target/nb.jar";
|
||||
|
@ -21,8 +21,9 @@ import io.nosqlbench.engine.core.ScenarioLogger;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
@ -36,7 +37,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test(singleThreaded = true)
|
||||
public class AsyncScriptIntegrationTests {
|
||||
|
||||
public static ScenarioResult runScenario(String scriptname, String... params) {
|
||||
@ -63,7 +63,7 @@ public class AsyncScriptIntegrationTests {
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
public void logit() {
|
||||
public static void logit() {
|
||||
System.out.println("Running ASYNC version of Script Integration Tests.");
|
||||
}
|
||||
|
||||
@ -245,7 +245,8 @@ public class AsyncScriptIntegrationTests {
|
||||
}
|
||||
|
||||
|
||||
@Test(enabled=false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testCycleRateChangeOldMetrics() {
|
||||
ScenarioResult scenarioResult = runScenario("cycle_rate_change_deprecated");
|
||||
String ioLog = scenarioResult.getIOLog();
|
||||
|
@ -20,13 +20,12 @@ package io.nosqlbench.engine.core.script;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.metrics.ActivityMetrics;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test
|
||||
public class MetricsIntegrationTest {
|
||||
|
||||
@Test
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
@ -21,8 +21,8 @@ import io.nosqlbench.engine.core.ScenarioLogger;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -31,7 +31,6 @@ import java.util.regex.Pattern;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Test(singleThreaded = true)
|
||||
public class ScriptIntegrationTests {
|
||||
|
||||
public static ScenarioResult runScenario(String scriptname, String... params) {
|
||||
@ -59,7 +58,7 @@ public class ScriptIntegrationTests {
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public void logit() {
|
||||
public static void logit() {
|
||||
System.out.println("Running SYNC version of Script Integration Tests.");
|
||||
}
|
||||
|
||||
@ -261,4 +260,4 @@ public class ScriptIntegrationTests {
|
||||
// );
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -15,22 +15,24 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import org.testng.annotations.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* These is here for experimentation on microbench scripts without requiring
|
||||
* them to be included in builds
|
||||
*/
|
||||
@Test
|
||||
public class SpeedCheckIntegrationTests {
|
||||
|
||||
@Test(enabled = false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSpeedSanity() {
|
||||
ScenarioResult scenarioResult = ScriptIntegrationTests.runScenario("speedcheck");
|
||||
}
|
||||
|
||||
@Test(enabled = false)
|
||||
@Test
|
||||
@Ignore
|
||||
public void testThreadSpeeds() {
|
||||
ScenarioResult scenarioResult = ScriptIntegrationTests.runScenario("threadspeeds");
|
||||
}
|
||||
|
@ -32,11 +32,11 @@
|
||||
<artifactId>virtdata-processors</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-annotations</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>io.nosqlbench</groupId>-->
|
||||
<!-- <artifactId>virtdata-annotations</artifactId>-->
|
||||
<!-- <version>3.12.73-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-lang</artifactId>
|
||||
@ -51,13 +51,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@ -67,10 +61,6 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -17,12 +17,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-processors</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>virtdata-annotations</artifactId>
|
||||
<artifactId>virtdata-api</artifactId>
|
||||
<version>3.12.73-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -48,13 +43,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core-java8</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user