Optimize libraries (#2458)
This commit is contained in:
parent
8c0ce48aae
commit
8a34433095
@ -7,7 +7,7 @@ import net.openhft.chronicle.ExcerptAppender;
|
|||||||
|
|
||||||
public class ChronicleQueue {
|
public class ChronicleQueue {
|
||||||
|
|
||||||
public static void writeToQueue(
|
static void writeToQueue(
|
||||||
Chronicle chronicle, String stringValue, int intValue, long longValue, double doubleValue)
|
Chronicle chronicle, String stringValue, int intValue, long longValue, double doubleValue)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
ExcerptAppender appender = chronicle.createAppender();
|
ExcerptAppender appender = chronicle.createAppender();
|
||||||
|
@ -11,10 +11,13 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import static org.awaitility.Awaitility.await;
|
import static org.awaitility.Awaitility.await;
|
||||||
import static org.awaitility.Awaitility.fieldIn;
|
import static org.awaitility.Awaitility.fieldIn;
|
||||||
import static org.awaitility.Awaitility.given;
|
import static org.awaitility.Awaitility.given;
|
||||||
|
import static org.awaitility.Awaitility.setDefaultPollDelay;
|
||||||
|
import static org.awaitility.Awaitility.setDefaultPollInterval;
|
||||||
|
import static org.awaitility.Awaitility.setDefaultTimeout;
|
||||||
import static org.awaitility.proxy.AwaitilityClassProxy.to;
|
import static org.awaitility.proxy.AwaitilityClassProxy.to;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
|
|
||||||
public class AsyncServiceUnitTest {
|
public class AsyncServiceLongRunningUnitTest {
|
||||||
private AsyncService asyncService;
|
private AsyncService asyncService;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@ -41,9 +44,9 @@ public class AsyncServiceUnitTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenAsyncService_whenInitialize_thenInitOccurs_withDefualts() {
|
public void givenAsyncService_whenInitialize_thenInitOccurs_withDefualts() {
|
||||||
Awaitility.setDefaultPollInterval(10, TimeUnit.MILLISECONDS);
|
setDefaultPollInterval(10, TimeUnit.MILLISECONDS);
|
||||||
Awaitility.setDefaultPollDelay(Duration.ZERO);
|
setDefaultPollDelay(Duration.ZERO);
|
||||||
Awaitility.setDefaultTimeout(Duration.ONE_MINUTE);
|
setDefaultTimeout(Duration.ONE_MINUTE);
|
||||||
|
|
||||||
asyncService.initialize();
|
asyncService.initialize();
|
||||||
await().until(asyncService::isInitialized);
|
await().until(asyncService::isInitialized);
|
@ -13,7 +13,7 @@ import net.openhft.chronicle.ChronicleQueueBuilder;
|
|||||||
import net.openhft.chronicle.ExcerptTailer;
|
import net.openhft.chronicle.ExcerptTailer;
|
||||||
import net.openhft.chronicle.tools.ChronicleTools;
|
import net.openhft.chronicle.tools.ChronicleTools;
|
||||||
|
|
||||||
public class ChronicleQueueTest {
|
public class ChronicleQueueIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenSetOfValues_whenWriteToQueue_thenWriteSuccesfully() throws IOException {
|
public void givenSetOfValues_whenWriteToQueue_thenWriteSuccesfully() throws IOException {
|
@ -11,7 +11,7 @@ import java.util.stream.LongStream;
|
|||||||
|
|
||||||
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
|
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
|
||||||
|
|
||||||
public class HLLUnitTest {
|
public class HLLLongRunningUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenHLL_whenAddHugeAmountOfNumbers_thenShouldReturnEstimatedCardinality() {
|
public void givenHLL_whenAddHugeAmountOfNumbers_thenShouldReturnEstimatedCardinality() {
|
Loading…
x
Reference in New Issue
Block a user