Search in sources :

Example 1 with MirrorNodeProperties

use of com.hedera.mirror.monitor.MirrorNodeProperties in project hedera-mirror-node by hashgraph.

the class RestSubscriberTest method setup.

@BeforeEach
void setup() {
    MonitorProperties monitorProperties = new MonitorProperties();
    monitorProperties.setMirrorNode(new MirrorNodeProperties());
    monitorProperties.getMirrorNode().getRest().setHost("127.0.0.1");
    restSubscriberProperties = new RestSubscriberProperties();
    restSubscriberProperties.setLimit(3L);
    restSubscriberProperties.setName("test");
    restSubscriberProperties.getRetry().setMaxAttempts(2L);
    restSubscriberProperties.getRetry().setMinBackoff(Duration.ofNanos(1L));
    restSubscriberProperties.getRetry().setMaxBackoff(Duration.ofNanos(2L));
    PublishScenarioProperties publishScenarioProperties = new PublishScenarioProperties();
    publishScenarioProperties.setName(SCENARIO);
    publishScenarioProperties.setType(TransactionType.CONSENSUS_SUBMIT_MESSAGE);
    publishScenario = new PublishScenario(publishScenarioProperties);
    subscribeProperties = new SubscribeProperties();
    subscribeProperties.getRest().put(restSubscriberProperties.getName(), restSubscriberProperties);
    WebClient.Builder builder = WebClient.builder().exchangeFunction(exchangeFunction);
    restSubscriber = new RestSubscriber(monitorProperties, subscribeProperties, builder);
}
Also used : SubscribeProperties(com.hedera.mirror.monitor.subscribe.SubscribeProperties) PublishScenarioProperties(com.hedera.mirror.monitor.publish.PublishScenarioProperties) MirrorNodeProperties(com.hedera.mirror.monitor.MirrorNodeProperties) WebClient(org.springframework.web.reactive.function.client.WebClient) MonitorProperties(com.hedera.mirror.monitor.MonitorProperties) PublishScenario(com.hedera.mirror.monitor.publish.PublishScenario) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

MirrorNodeProperties (com.hedera.mirror.monitor.MirrorNodeProperties)1 MonitorProperties (com.hedera.mirror.monitor.MonitorProperties)1 PublishScenario (com.hedera.mirror.monitor.publish.PublishScenario)1 PublishScenarioProperties (com.hedera.mirror.monitor.publish.PublishScenarioProperties)1 SubscribeProperties (com.hedera.mirror.monitor.subscribe.SubscribeProperties)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 WebClient (org.springframework.web.reactive.function.client.WebClient)1