mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Merge pull request #334 from XN137/remove-junit4-dependency
Remove junit4 dependency
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.docsys.core;
|
||||
|
||||
import io.nosqlbench.docsys.endpoints.DocsysMarkdownEndpoint;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class DocsysMarkdownLoaderEndpointTest {
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ package io.nosqlbench.activitytype.cockroachdb;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.activityimpl.ParameterMap;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.postgresql.util.PSQLException;
|
||||
import org.postgresql.util.PSQLState;
|
||||
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class CockroachActivityTest {
|
||||
@Test
|
||||
|
||||
@@ -3,13 +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.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class CqlActionTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testCqlAction() {
|
||||
ActivityDef ad = ActivityDef.parseActivityDef("driver=ebdrivers;alias=foo;yaml=write-telemetry.yaml;");
|
||||
CqlActivity cac = new CqlActivity(ad);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.datastax.ebdrivers.cql.statements;
|
||||
|
||||
import io.nosqlbench.activitytype.cql.statements.core.CQLStatementDefParser;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.datastax.driver.core.policies.ReconnectionPolicy;
|
||||
import com.datastax.driver.core.policies.RetryPolicy;
|
||||
import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
|
||||
import io.nosqlbench.activitytype.cql.core.CQLOptions;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.activitytype.cql.core;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.nosqlbench.activitytype.cql.datamappers.functions.double_to_cqldurati
|
||||
import com.datastax.driver.core.Duration;
|
||||
import io.nosqlbench.activitytype.cql.datamappers.functions.long_to_cqlduration.CqlDurationFunctions;
|
||||
import io.nosqlbench.activitytype.cql.datamappers.functions.long_to_cqlduration.ToCqlDurationNanos;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.LongToIntFunction;
|
||||
import java.util.function.LongUnaryOperator;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.activitytype.cql.datamappers.functions.long_localdate;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.activitytype.cql.datamappers.functions.to_daterange;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.generators.cql.lang;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
@@ -3,13 +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.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class CqlActionTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testCqlAction() {
|
||||
ActivityDef ad = ActivityDef.parseActivityDef("driver=ebdrivers;alias=foo;yaml=write-telemetry.yaml;");
|
||||
CqlActivity cac = new CqlActivity(ad);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.datastax.ebdrivers.cql.statements;
|
||||
|
||||
import io.nosqlbench.activitytype.cql.statements.core.CQLStatementDefParser;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.datastax.driver.core.policies.ReconnectionPolicy;
|
||||
import com.datastax.driver.core.policies.RetryPolicy;
|
||||
import com.datastax.driver.core.policies.SpeculativeExecutionPolicy;
|
||||
import io.nosqlbench.activitytype.cql.core.CQLOptions;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.activitytype.cql.core;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.generators.cql.lang;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/*
|
||||
* Copyright 2016 jshook
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.activitytype.diag;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.activitytype.cmds;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.nosqlbench.activitytype.cmds;
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.net.http.HttpRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HttpActivityTypeTest {
|
||||
@Test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.driver.jmx;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.driver.mongodb;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.planning.OpSequence;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
@@ -12,7 +12,7 @@ public class MongoActivityTest {
|
||||
|
||||
private ActivityDef activityDef;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
String[] params = {
|
||||
"yaml=activities/mongodb-basic.yaml",
|
||||
|
||||
@@ -10,8 +10,8 @@ import io.nosqlbench.virtdata.core.templates.BindPoint;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bson.conversions.Bson;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -25,7 +25,7 @@ public class ReadyMongoStatementTest {
|
||||
private ActivityDef activityDef;
|
||||
private StmtsDocList stmtsDocList;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
String[] params = {
|
||||
"yaml=activities/mongodb-basic.yaml",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.activitytype.stdout;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Created by sebastianestevez on 5/5/17.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.nosqlbench.driver.webdriver;
|
||||
|
||||
import io.nosqlbench.nb.api.testutils.Perf;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
||||
@@ -18,7 +18,7 @@ import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
||||
public class ExampleWebScript {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void getDocsSiteChromeDriver() {
|
||||
System.setProperty("webdriver.http.factory", "okhttp");
|
||||
WebDriver driver = new ChromeDriver();
|
||||
@@ -39,7 +39,7 @@ public class ExampleWebScript {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void getDocSiteWebHtml() {
|
||||
// System.setProperty("webdriver.http.factory", "okhttp");
|
||||
WebDriver driver = new HtmlUnitDriver(false);
|
||||
|
||||
@@ -19,11 +19,12 @@
|
||||
package io.nosqlbench.engine.api.activityapi;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ParameterMap;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class ParameterMapTest {
|
||||
|
||||
@@ -85,11 +86,12 @@ public class ParameterMapTest {
|
||||
assertThat(multiNames.get().getOptionalString("delta","gamma").orElse("missing")).isEqualTo("blue");
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testAmbiguousMultiValueThrowsException() {
|
||||
Optional<ParameterMap> multiNames = ParameterMap.parseParams("alpha=blue;beta=red;delta=blue");
|
||||
assertThat(multiNames).isPresent();
|
||||
assertThat(multiNames.get().getOptionalString("alpha","delta").orElse("missing")).isEqualTo("blue");
|
||||
assertThatExceptionOfType(RuntimeException.class)
|
||||
.isThrownBy(() -> multiNames.get().getOptionalString("alpha","delta"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -6,7 +6,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class OpTrackerImplTest {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -20,7 +20,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package io.nosqlbench.engine.api.activityapi.cyclelog.filters.tristate;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.ResultReadable;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ 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.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CycleLogInputTest {
|
||||
private final static String filepath="cycle-log-reader-test";
|
||||
private static File cyclefile;
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll
|
||||
public static void createTempFile() {
|
||||
try {
|
||||
cyclefile = File.createTempFile(filepath, "cyclelog");
|
||||
|
||||
@@ -22,7 +22,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.errorhandling;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.ArrayList;
|
||||
@@ -26,19 +26,22 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class HashedErrorHandlerTest {
|
||||
|
||||
HashedErrorHandler<Throwable, Boolean> handler;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void beforeTest() {
|
||||
handler = new HashedErrorHandler<Throwable,Boolean>();
|
||||
}
|
||||
|
||||
@Test(expected= RuntimeException.class)
|
||||
@Test
|
||||
public void testDefaultHandlerThrowsException() {
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> {
|
||||
handler.handleError(1L, new InvalidParameterException("this is an invalid exception, actually"));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -91,7 +94,7 @@ public class HashedErrorHandlerTest {
|
||||
assertThat(result).isFalse();
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testNamedGroup() {
|
||||
handler.setGroup("test1",IndexOutOfBoundsException.class,ArrayIndexOutOfBoundsException.class);
|
||||
handler.setGroup("types",InvalidParameterException.class);
|
||||
@@ -99,36 +102,41 @@ public class HashedErrorHandlerTest {
|
||||
assertThat(handler.getGroupNames()).hasSize(2);
|
||||
assertThat(handler.getGroupNames()).contains("test1");
|
||||
assertThat(handler.getGroupNames()).contains("types");
|
||||
handler.handleError(5L,new InvalidParameterException("this is an error"));
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() ->
|
||||
handler.handleError(5L,new InvalidParameterException("this is an error")));
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testFindVagueSingleSubmatchException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
handler.setHandlerForPattern("Index", CycleErrorHandlers.rethrow("12345 678910 11 12"));
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() ->
|
||||
handler.setHandlerForPattern("Index", CycleErrorHandlers.rethrow("12345 678910 11 12")));
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
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"));
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() ->
|
||||
handler.handleError(9L, new IndexOutOfBoundsException("9L was out of bounds")));
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testNonMatchingSubstringException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
Set<Class<? extends Throwable>> groups = handler.getGroup("index");
|
||||
assertThat(groups).isNotNull();
|
||||
assertThat(groups).hasSize(2);
|
||||
assertThat(groups.contains(IndexOutOfBoundsException.class)).isTrue();
|
||||
handler.setHandlerForPattern("Dyahwemo", CycleErrorHandlers.rethrow("Journey through the klein bottle."));
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() ->
|
||||
handler.setHandlerForPattern("Dyahwemo", CycleErrorHandlers.rethrow("Journey through the klein bottle.")));
|
||||
}
|
||||
|
||||
@Test(expected=RuntimeException.class)
|
||||
@Test
|
||||
public void testSetHandlerForMissingGroupException() {
|
||||
handler.setGroup("index", IndexOutOfBoundsException.class, ArrayIndexOutOfBoundsException.class);
|
||||
handler.setHandlerForGroup("outdex", CycleErrorHandlers.rethrow("Journey through the klein bottle."));
|
||||
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() ->
|
||||
handler.setHandlerForGroup("outdex", CycleErrorHandlers.rethrow("Journey through the klein bottle.")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -6,22 +6,23 @@ import com.codahale.metrics.Meter;
|
||||
import com.codahale.metrics.Timer;
|
||||
import io.nosqlbench.engine.api.activityapi.errorhandling.ErrorMetrics;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class NBErrorHandlerTest {
|
||||
|
||||
private final RuntimeException runtimeException = new RuntimeException("test exception");
|
||||
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testNullConfig() {
|
||||
ErrorMetrics errorMetrics = new ErrorMetrics(ActivityDef.parseActivityDef("alias=testalias_stop"));
|
||||
NBErrorHandler errhandler = new NBErrorHandler(() -> "stop", () -> errorMetrics);
|
||||
ErrorDetail detail = errhandler.handleError(runtimeException, 1, 2);
|
||||
assertThatExceptionOfType(RuntimeException.class)
|
||||
.isThrownBy(() -> errhandler.handleError(runtimeException, 1, 2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -90,6 +91,4 @@ public class NBErrorHandlerTest {
|
||||
assertThat(detail.isRetryable()).isFalse();
|
||||
assertThat(detail.resultCode).isEqualTo(42);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.api.activityapi.planning;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.planning;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.planning;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.api.testutils.Perf;
|
||||
import io.nosqlbench.nb.api.testutils.Result;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -32,77 +32,77 @@ public class TestHybridRateLimiterPerf {
|
||||
private RateLimiterPerfTestMethods methods = new RateLimiterPerfTestMethods();
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e9() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E9, 1.1),10_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e8() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E8, 1.1),50_000_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e7() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E7, 1.1),5_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e6() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E6, 1.1),500_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e5() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E5, 1.1),50_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e4() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E4, 1.1),5_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e3() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E3, 1.1),500,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e2() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E2, 1.1),50,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E1, 1.1),5,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e0() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E0, 1.1),2,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testePerf1eN1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E-1, 1.1),1,0.005d);
|
||||
System.out.println(result);
|
||||
@@ -110,14 +110,14 @@ public class TestHybridRateLimiterPerf {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -130,7 +130,7 @@ public class TestHybridRateLimiterPerf {
|
||||
// JVM 11.0.1
|
||||
// 400000000_ops 33.622751_S 11896706.363_ops_s, 84_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -150,7 +150,7 @@ public class TestHybridRateLimiterPerf {
|
||||
// 200000000_ops 17.691698_S 11304737.461_ops_s, 88_ns_op
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -163,7 +163,7 @@ public class TestHybridRateLimiterPerf {
|
||||
// 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
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 10_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -177,7 +177,7 @@ public class TestHybridRateLimiterPerf {
|
||||
// JVM 11.0.1
|
||||
// 200000000_ops 11.839666_S 16892368.438_ops_s, 59_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 40_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
||||
@@ -19,8 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.api.testutils.Perf;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// JVM 11.0.1
|
||||
// 160000000_ops 18.122886_S 8828615.971_ops_s, 113_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test10Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -50,7 +50,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// JVM 11.0.1
|
||||
// 80000000_ops 8.354648_S 9575507.945_ops_s, 104_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test10Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -60,7 +60,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// JVM 11.0.1
|
||||
// 40000000_ops 4.001661_S 9995849.116_ops_s, 100_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test10Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -70,7 +70,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// JVM 11.0.1
|
||||
// 20000000_ops 1.914366_S 10447323.063_ops_s, 96_ns_op
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test10Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 10), 20_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -84,7 +84,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test10Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -99,7 +99,7 @@ public class TestRateLimiterPerf1E7 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test10Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E7, 1.1), 20_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
||||
@@ -19,8 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.api.testutils.Perf;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 1600000000_ops 158.224286_S 10_112_227.620_ops_s, 99_ns_op
|
||||
//
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_160threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,160);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -55,7 +55,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test100Mops_80threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,80);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -68,7 +68,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test100Mops_40threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,40);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -88,7 +88,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 200000000_ops 17.691698_S 11304737.461_ops_s, 88_ns_op
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void test100Mops_20threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,20);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -104,7 +104,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test100Mops_10threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,10);
|
||||
System.out.println(perf.getLastResult());
|
||||
@@ -121,7 +121,7 @@ public class TestRateLimiterPerf1E8 {
|
||||
// 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
|
||||
@Disabled
|
||||
public void test100Mops_5threads() {
|
||||
Perf perf = methods.testRateLimiterMultiThreadedContention(rlFunction, new RateSpec(1E8, 1.1), 100_000_000,5);
|
||||
System.out.println(perf.getLastResult());
|
||||
|
||||
@@ -19,8 +19,8 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.api.testutils.Result;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -37,77 +37,77 @@ public class TestRateLimiterPerfSingle {
|
||||
private RateLimiterPerfTestMethods methods = new RateLimiterPerfTestMethods();
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e9() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E9, 1.1),10_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e8() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E8, 1.1),50_000_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e7() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E7, 1.1),5_000_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e6() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E6, 1.1),500_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e5() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E5, 1.1),50_000,0.01d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e4() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E4, 1.1),5_000,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e3() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E3, 1.1),500,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e2() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E2, 1.1),50,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E1, 1.1),5,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testPerf1e0() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E0, 1.1),2,0.005d);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testePerf1eN1() {
|
||||
Result result = methods.rateLimiterSingleThreadedConvergence(rlFunction,new RateSpec(1E-1, 1.1),1,0.005d);
|
||||
System.out.println(result);
|
||||
|
||||
@@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityapi.ratelimits;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.activityimpl.ParameterMap;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.sysperf;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class SysPerfBaselinerTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testSysOpsNanoTime() {
|
||||
SysPerfBaseliner sbo = new SysPerfBaseliner();
|
||||
SysPerfData perfdata = sbo.getSysPerfData();
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityapi.sysperf;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.nio.file.attribute.FileTime;
|
||||
import java.util.Optional;
|
||||
@@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class SysPerfTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testForcedBench() {
|
||||
|
||||
// SysPerf.get().reset();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityconfig;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -21,7 +21,7 @@ import io.nosqlbench.virtdata.core.bindings.DataMapper;
|
||||
import io.nosqlbench.virtdata.core.bindings.VirtData;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
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.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -19,10 +19,10 @@ package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
||||
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.*;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class StmtEscapingTest {
|
||||
private final static Logger logger = LogManager.getLogger(StmtEscapingTest.class);
|
||||
private static List<OpTemplate> defs;
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll
|
||||
public static void testLayering() {
|
||||
|
||||
StmtsDocList all = StatementsLoader.loadPath(logger, "testdocs/escaped_stmts.yaml");
|
||||
|
||||
@@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ 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.junit.jupiter.api.BeforeAll;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ParsedStmtTest {
|
||||
private static final Logger logger = LogManager.getLogger(ParsedStmtTest.class);
|
||||
private static StmtsDocList doclist;
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll
|
||||
public static void testLoadYaml() {
|
||||
doclist = StatementsLoader.loadPath(logger, "testdocs/bindings.yaml");
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package io.nosqlbench.engine.api.activityconfig.yaml;
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -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.junit.jupiter.api.BeforeAll;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -49,7 +49,7 @@ public class StmtsDocListTest {
|
||||
}};
|
||||
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll
|
||||
public static void testLoadYaml() {
|
||||
doclist = StatementsLoader.loadPath(logger, "testdocs/docs_blocks_stmts.yaml");
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ 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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package io.nosqlbench.engine.api.activityimpl.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.cyclelog.buffers.results.CycleSegment;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.activityimpl.marker;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -2,8 +2,8 @@ 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.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -139,7 +139,7 @@ public class LongTreeTrackerTest2 {
|
||||
*/
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void speedcheckThreadLocal() {
|
||||
long t1=System.nanoTime();
|
||||
LongTreeTracker t = new LongTreeTracker();
|
||||
@@ -159,7 +159,7 @@ public class LongTreeTrackerTest2 {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void speedcheckConcurrentLocal() {
|
||||
long t1=System.nanoTime();
|
||||
LongTreeTracker t = new LongTreeTrackerAtomic();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.api.activityimpl.tracking;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.marker.longheap.TreeTracker1024;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.api.clireader;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.Metric;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.Snapshot;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class DeltaHdrHistogramReservoirTest {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ package io.nosqlbench.engine.api.metrics;
|
||||
import org.HdrHistogram.EncodableHistogram;
|
||||
import org.HdrHistogram.Histogram;
|
||||
import org.HdrHistogram.HistogramLogReader;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ package io.nosqlbench.engine.api.metrics;
|
||||
|
||||
import com.codahale.metrics.ExponentiallyDecayingReservoir;
|
||||
import com.codahale.metrics.Snapshot;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TestHistoTypes {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void compareHistos() {
|
||||
Clock c = new Clock();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.scripting;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.nosqlbench.engine.api.templating;
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.templating;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class BasicScriptBufferTest {
|
||||
|
||||
@@ -62,14 +63,9 @@ public class BasicScriptBufferTest {
|
||||
assertThat(script).matches("(?s).*a single line.*");
|
||||
}
|
||||
|
||||
@Test(expected = NumberFormatException.class)
|
||||
@Test
|
||||
public void shouldThrowErrorForInvalidWaitMillisOperand() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "waitmillis", "noway" });
|
||||
BasicScriptBuffer b = new BasicScriptBuffer();
|
||||
b.add(opts.getCommands().toArray(new Cmd[0]));
|
||||
String s = b.getParsedScript();
|
||||
assertThatExceptionOfType(NumberFormatException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{ "waitmillis", "noway" }));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
@@ -10,6 +10,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class NBCLIArgsFileTest {
|
||||
|
||||
@@ -30,11 +31,11 @@ public class NBCLIArgsFileTest {
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException.class)
|
||||
@Test
|
||||
public void testLoadingMissingRequiredFails() {
|
||||
LinkedList<String> result;
|
||||
NBCLIArgsFile argsFile = new NBCLIArgsFile();
|
||||
result = argsFile.process("--argsfile-required", "src/test/resources/argsfiles/nonextant.cli");
|
||||
assertThatExceptionOfType(RuntimeException.class)
|
||||
.isThrownBy(() -> argsFile.process("--argsfile-required", "src/test/resources/argsfiles/nonextant.cli"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -2,11 +2,12 @@ package io.nosqlbench.engine.cli;
|
||||
|
||||
import io.nosqlbench.engine.api.scenarios.NBCLIScenarioParser;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class NBCLIScenarioParserTest {
|
||||
|
||||
@@ -49,15 +50,16 @@ public class NBCLIScenarioParserTest {
|
||||
assertThat(cmds.get(0).getArg("driver")).isEqualTo("stdout");
|
||||
}
|
||||
|
||||
@Test(expected = BasicError.class)
|
||||
@Test
|
||||
public void testThatVerboseFinalParameterThrowsError() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "scenario-test", "yaml=canttouchthis"});
|
||||
List<Cmd> cmds = opts.getCommands();
|
||||
assertThatExceptionOfType(BasicError.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{ "scenario-test", "yaml=canttouchthis"}));
|
||||
}
|
||||
|
||||
@Test(expected = BasicError.class)
|
||||
@Test
|
||||
public void testThatMissingScenarioNameThrowsError() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "scenario-test", "missing-scenario"});
|
||||
assertThatExceptionOfType(BasicError.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{ "scenario-test", "missing-scenario"}));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.cli;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.nosqlbench.engine.cli;
|
||||
|
||||
import io.nosqlbench.docsys.core.PathWalker;
|
||||
import io.nosqlbench.nb.api.content.NBIO;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
@@ -11,6 +11,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class TestNBCLIOptions {
|
||||
|
||||
@@ -87,9 +88,10 @@ public class TestNBCLIOptions {
|
||||
assertThat(opts.wantsTopicalHelp()).isFalse();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void shouldErrorSanelyWhenNoMatch() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"unrecognizable command"});
|
||||
assertThatExceptionOfType(IllegalArgumentException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{"unrecognizable command"}));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,14 +104,16 @@ public class TestNBCLIOptions {
|
||||
assertThat(cmd.getParams().get("param1")).isEqualTo("value1");
|
||||
}
|
||||
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
@Test
|
||||
public void testShouldErrorSanelyWhenScriptNameSkipped() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"script", "param1=value1"});
|
||||
assertThatExceptionOfType(InvalidParameterException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{"script", "param1=value1"}));
|
||||
}
|
||||
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
@Test
|
||||
public void testShouldErrorForMissingScriptName() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{"script"});
|
||||
assertThatExceptionOfType(InvalidParameterException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{"script"}));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -140,10 +144,10 @@ public class TestNBCLIOptions {
|
||||
|
||||
}
|
||||
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
@Test
|
||||
public void shouldThrowErrorForInvalidStopActivity() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "stop", "woah=woah" });
|
||||
List<Cmd> cmds = opts.getCommands();
|
||||
assertThatExceptionOfType(InvalidParameterException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{ "stop", "woah=woah" }));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -155,11 +159,10 @@ public class TestNBCLIOptions {
|
||||
|
||||
}
|
||||
|
||||
@Test(expected = InvalidParameterException.class)
|
||||
@Test
|
||||
public void shouldThrowErrorForInvalidAwaitActivity() {
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ "await", "awaitme=notvalid" });
|
||||
List<Cmd> cmds = opts.getCommands();
|
||||
|
||||
assertThatExceptionOfType(InvalidParameterException.class)
|
||||
.isThrownBy(() -> new NBCLIOptions(new String[]{ "await", "awaitme=notvalid" }));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.clients.grafana;
|
||||
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.nosqlbench.engine.clients.grafana;
|
||||
|
||||
import io.nosqlbench.engine.clients.grafana.transfer.GAnnotation;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -10,7 +10,7 @@ public class GrafanaClientTest {
|
||||
private static final String testurl = "http://localhost:3000/";
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testCreateAnnotation() {
|
||||
GrafanaClient client = new GrafanaClient(testurl);
|
||||
client.getConfig().basicAuth("admin", "admin");
|
||||
@@ -22,7 +22,7 @@ public class GrafanaClientTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testFindAnnotations() {
|
||||
GrafanaClient client = new GrafanaClient(testurl);
|
||||
client.getConfig().basicAuth("admin", "admin");
|
||||
@@ -31,7 +31,7 @@ public class GrafanaClientTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testGetApiToken() {
|
||||
GrafanaClient client = new GrafanaClient(testurl);
|
||||
client.getConfig().basicAuth("admin", "admin");
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package io.nosqlbench.engine.clients.grafana.analyzer;
|
||||
|
||||
import io.nosqlbench.engine.clients.grafana.transfer.GDashboard;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class GrafanaRegionAnalyzerTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testGetQueries() {
|
||||
GrafanaRegionAnalyzer gra = new GrafanaRegionAnalyzer();
|
||||
gra.setBaseUrl("http://44.242.139.57:3000/");
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import io.nosqlbench.nb.api.content.NBIO;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
@@ -14,7 +14,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class PMatrixElemTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testMatrixElem() {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
String json = NBIO.classpath().name("test.json").one().asString();
|
||||
|
||||
@@ -15,7 +15,7 @@ import io.nosqlbench.engine.api.activityimpl.motor.CoreMotorDispenser;
|
||||
import io.nosqlbench.engine.core.lifecycle.ActivityExecutor;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
@@ -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.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicLongArray;
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.nosqlbench.engine.core;
|
||||
|
||||
import io.nosqlbench.engine.api.scripting.ScriptEnvBuffer;
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.core.experimental;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.nosqlbench.engine.core.metrics;
|
||||
|
||||
import com.codahale.metrics.Timer;
|
||||
import io.nosqlbench.engine.api.metrics.DeltaHdrHistogramReservoir;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.api.scripting.ScriptEnvBuffer;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ScenariosExecutorTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void testAwaitOnTime() {
|
||||
ScenariosExecutor e = new ScenariosExecutor(ScenariosExecutorTest.class.getSimpleName(), 1);
|
||||
Scenario s = new Scenario("testing", Scenario.Engine.Graalvm,"stdout:3000");
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
public class ScriptParamsTest {
|
||||
|
||||
@Test(expected = BasicError.class)
|
||||
@Test
|
||||
public void testThatNullOverridesKeyThrowsBasicError() {
|
||||
ScriptParams p = new ScriptParams();
|
||||
p.putAll(Map.of("a","b"));
|
||||
p.withDefaults(Map.of("c","d"));
|
||||
HashMap<String, String> overrides = new HashMap<>();
|
||||
overrides.put(null,"test");
|
||||
p.withOverrides(overrides);
|
||||
assertThatExceptionOfType(BasicError.class)
|
||||
.isThrownBy(() -> p.withOverrides(overrides));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user