Search in sources :

Example 1 with AggregatorTestUnit

use of it.unibo.arces.wot.sepa.AggregatorTestUnit in project SEPA by arces-wot.

the class ITPattern method aggregation.

@RepeatedTest(ConfigurationProvider.REPEATED_TEST)
@Timeout(10)
public void aggregation() throws InterruptedException, SEPASecurityException, IOException, SEPAPropertiesException, SEPAProtocolException, SEPABindingsException {
    logger.debug("Aggregator");
    consumerRandom1 = new ConsumerTestUnit(provider, "RANDOM1");
    consumerRandom1.syncSubscribe(provider.TIMEOUT, provider.NRETRY);
    logger.debug("Aggregator first subscribe ok");
    randomAggregator = new AggregatorTestUnit(provider, "RANDOM", "RANDOM1");
    randomAggregator.syncSubscribe(provider.TIMEOUT, provider.NRETRY);
    logger.debug("Aggregator second subscribe ok");
    randomProducer = new Producer(provider.getJsap(), "RANDOM");
    Response ret = randomProducer.update(provider.TIMEOUT, provider.NRETRY);
    assertFalse(ret.isError(), ret.toString());
    logger.debug("Aggregator Update Done");
    randomAggregator.waitNotification();
    consumerRandom1.waitNotification();
    logger.debug("Aggregator stop");
}
Also used : ConsumerTestUnit(it.unibo.arces.wot.sepa.ConsumerTestUnit) Response(it.unibo.arces.wot.sepa.commons.response.Response) AggregatorTestUnit(it.unibo.arces.wot.sepa.AggregatorTestUnit) RepeatedTest(org.junit.jupiter.api.RepeatedTest) Timeout(org.junit.jupiter.api.Timeout)

Example 2 with AggregatorTestUnit

use of it.unibo.arces.wot.sepa.AggregatorTestUnit in project SEPA by arces-wot.

the class StressUsingPAC method beginTest.

@BeforeEach
public void beginTest() throws SEPAProtocolException, SEPASecurityException, SEPAPropertiesException {
    consumerAll = new ConsumerTestUnit(provider, "ALL");
    randomProducer = new Producer(provider.getJsap(), "RANDOM");
    randomAggregator = new AggregatorTestUnit(provider, "RANDOM", "RANDOM1");
    consumerRandom1 = new ConsumerTestUnit(provider, "RANDOM1");
    genericClient = new GenericClient(provider.getJsap(), this);
}
Also used : ConsumerTestUnit(it.unibo.arces.wot.sepa.ConsumerTestUnit) GenericClient(it.unibo.arces.wot.sepa.pattern.GenericClient) Producer(it.unibo.arces.wot.sepa.pattern.Producer) AggregatorTestUnit(it.unibo.arces.wot.sepa.AggregatorTestUnit) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AggregatorTestUnit (it.unibo.arces.wot.sepa.AggregatorTestUnit)2 ConsumerTestUnit (it.unibo.arces.wot.sepa.ConsumerTestUnit)2 Response (it.unibo.arces.wot.sepa.commons.response.Response)1 GenericClient (it.unibo.arces.wot.sepa.pattern.GenericClient)1 Producer (it.unibo.arces.wot.sepa.pattern.Producer)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 RepeatedTest (org.junit.jupiter.api.RepeatedTest)1 Timeout (org.junit.jupiter.api.Timeout)1