Search in sources :

Example 1 with ParSeqUnitTestHelper

use of com.linkedin.parseq.ParSeqUnitTestHelper in project rest.li by linkedin.

the class TestParseqBasedFluentClientApiWithProjections method setUp.

@BeforeClass
void setUp() throws Exception {
    super.init(Arrays.asList(new RestLiValidationFilter()));
    _parSeqUnitTestHelper = new ParSeqUnitTestHelper();
    _parSeqUnitTestHelper.setUp();
    _parSeqRestliClient = new ParSeqRestliClientBuilder().setClient(getClient()).setConfig(new ParSeqRestliClientConfigBuilder().build()).build();
}
Also used : ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) ParSeqRestliClientConfigBuilder(com.linkedin.restli.client.ParSeqRestliClientConfigBuilder) RestLiValidationFilter(com.linkedin.restli.server.validation.RestLiValidationFilter) ParSeqRestliClientBuilder(com.linkedin.restli.client.ParSeqRestliClientBuilder) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with ParSeqUnitTestHelper

use of com.linkedin.parseq.ParSeqUnitTestHelper in project rest.li by linkedin.

the class MockBatchingStrategy method setup.

@BeforeClass
public void setup() throws Exception {
    _parSeqUnitTestHelper = new ParSeqUnitTestHelper();
    _parSeqUnitTestHelper.setUp();
    _engine = _parSeqUnitTestHelper.getEngine();
}
Also used : ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with ParSeqUnitTestHelper

use of com.linkedin.parseq.ParSeqUnitTestHelper in project rest.li by linkedin.

the class TestParSeqBasedFluentClientApiWithExecutionGroup method setUp.

@BeforeClass
void setUp() throws Exception {
    super.init(Arrays.asList(new RestLiValidationFilter()));
    ParSeqRestliClientConfig config = new ParSeqRestliClientConfigBuilder().addBatchingEnabled("*.*/*.*", Boolean.TRUE).addMaxBatchSize("*.*/*.*", TEST_BATCH_SIZE).build();
    BatchingSupport batchingSupport = new BatchingSupport();
    _parSeqUnitTestHelper = new ParSeqUnitTestHelper(engineBuilder -> {
        engineBuilder.setPlanDeactivationListener(batchingSupport);
    });
    _parSeqUnitTestHelper.setUp();
    _parSeqRestliClient = // RestClient Registered Strategy
    new ParSeqRestliClientBuilder().setBatchingSupport(batchingSupport).setClient(getClient()).setConfig(config).build();
}
Also used : ParSeqRestliClientConfigBuilder(com.linkedin.restli.client.ParSeqRestliClientConfigBuilder) ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) AfterClass(org.testng.annotations.AfterClass) Arrays(java.util.Arrays) RestLiValidationFilter(com.linkedin.restli.server.validation.RestLiValidationFilter) BeforeClass(org.testng.annotations.BeforeClass) GreetingsFluentClient(com.linkedin.restli.examples.greetings.client.GreetingsFluentClient) TimeoutException(java.util.concurrent.TimeoutException) ExecutionGroup(com.linkedin.restli.client.ExecutionGroup) Test(org.testng.annotations.Test) Trace(com.linkedin.parseq.trace.Trace) ArrayList(java.util.ArrayList) ParSeqRestliClientConfig(com.linkedin.restli.client.ParSeqRestliClientConfig) TimeUnit(java.util.concurrent.TimeUnit) ParSeqRestliClientConfigBuilder(com.linkedin.restli.client.ParSeqRestliClientConfigBuilder) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) ParSeqRestliClient(com.linkedin.restli.client.ParSeqRestliClient) Assert(org.testng.Assert) ParSeqRestliClientBuilder(com.linkedin.restli.client.ParSeqRestliClientBuilder) Greeting(com.linkedin.restli.examples.greetings.api.Greeting) ParSeqBasedCompletionStage(com.linkedin.restli.client.ParSeqBasedCompletionStage) ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) BatchingSupport(com.linkedin.parseq.batching.BatchingSupport) Task(com.linkedin.parseq.Task) ParSeqRestliClientConfig(com.linkedin.restli.client.ParSeqRestliClientConfig) RestLiValidationFilter(com.linkedin.restli.server.validation.RestLiValidationFilter) BatchingSupport(com.linkedin.parseq.batching.BatchingSupport) ParSeqRestliClientBuilder(com.linkedin.restli.client.ParSeqRestliClientBuilder) BeforeClass(org.testng.annotations.BeforeClass)

Example 4 with ParSeqUnitTestHelper

use of com.linkedin.parseq.ParSeqUnitTestHelper in project rest.li by linkedin.

the class TestParseqBasedFluentClientApi method setUp.

@BeforeClass
void setUp() throws Exception {
    super.init();
    _parSeqUnitTestHelper = new ParSeqUnitTestHelper();
    _parSeqUnitTestHelper.setUp();
    _parSeqRestliClient = new ParSeqRestliClientBuilder().setClient(getClient()).setConfig(new ParSeqRestliClientConfigBuilder().build()).build();
}
Also used : ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) ParSeqRestliClientConfigBuilder(com.linkedin.restli.client.ParSeqRestliClientConfigBuilder) ParSeqRestliClientBuilder(com.linkedin.restli.client.ParSeqRestliClientBuilder) BeforeClass(org.testng.annotations.BeforeClass)

Example 5 with ParSeqUnitTestHelper

use of com.linkedin.parseq.ParSeqUnitTestHelper in project rest.li by linkedin.

the class TestParSeqBasedCompletionStage method setup.

@BeforeClass
public void setup() throws Exception {
    _parSeqUnitTestHelper = new ParSeqUnitTestHelper();
    _parSeqUnitTestHelper.setUp();
    _engine = _parSeqUnitTestHelper.getEngine();
    _parSeqBasedCompletionStageFactory = new ParSeqBasedCompletionStageFactory<>(_engine);
}
Also used : ParSeqUnitTestHelper(com.linkedin.parseq.ParSeqUnitTestHelper) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ParSeqUnitTestHelper (com.linkedin.parseq.ParSeqUnitTestHelper)5 BeforeClass (org.testng.annotations.BeforeClass)5 ParSeqRestliClientBuilder (com.linkedin.restli.client.ParSeqRestliClientBuilder)3 ParSeqRestliClientConfigBuilder (com.linkedin.restli.client.ParSeqRestliClientConfigBuilder)3 RestLiValidationFilter (com.linkedin.restli.server.validation.RestLiValidationFilter)2 Task (com.linkedin.parseq.Task)1 BatchingSupport (com.linkedin.parseq.batching.BatchingSupport)1 Trace (com.linkedin.parseq.trace.Trace)1 ExecutionGroup (com.linkedin.restli.client.ExecutionGroup)1 ParSeqBasedCompletionStage (com.linkedin.restli.client.ParSeqBasedCompletionStage)1 ParSeqRestliClient (com.linkedin.restli.client.ParSeqRestliClient)1 ParSeqRestliClientConfig (com.linkedin.restli.client.ParSeqRestliClientConfig)1 Greeting (com.linkedin.restli.examples.greetings.api.Greeting)1 GreetingsFluentClient (com.linkedin.restli.examples.greetings.client.GreetingsFluentClient)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 List (java.util.List)1 CompletionStage (java.util.concurrent.CompletionStage)1 TimeUnit (java.util.concurrent.TimeUnit)1 TimeoutException (java.util.concurrent.TimeoutException)1