Search in sources :

Example 1 with NodeLocalProperties

use of com.hedera.services.context.properties.NodeLocalProperties in project hedera-services by hashgraph.

the class RecordStreamManagerTest method init.

@BeforeAll
public static void init() throws Exception {
    given(platform.getSelfId()).willReturn(new NodeId(false, 0L));
    NodeLocalProperties disabledProps = mock(NodeLocalProperties.class);
    given(disabledProps.isRecordStreamEnabled()).willReturn(false);
    NodeLocalProperties enabledProps = mock(NodeLocalProperties.class);
    given(enabledProps.isRecordStreamEnabled()).willReturn(true);
    configProps(disabledProps);
    configProps(enabledProps);
    RecordStreamType streamType = mock(RecordStreamType.class);
    disableStreamingInstance = new RecordStreamManager(platform, runningAvgsMock, disabledProps, recordMemo, INITIAL_RANDOM_HASH, streamType);
    enableStreamingInstance = new RecordStreamManager(platform, runningAvgsMock, enabledProps, recordMemo, INITIAL_RANDOM_HASH, streamType);
}
Also used : NodeId(com.swirlds.common.NodeId) NodeLocalProperties(com.hedera.services.context.properties.NodeLocalProperties) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

NodeLocalProperties (com.hedera.services.context.properties.NodeLocalProperties)1 NodeId (com.swirlds.common.NodeId)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1