Skip to content

Commit

Permalink
add additional unit test
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 committed Dec 13, 2024
1 parent c685271 commit 79073e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public record BlockStreamConfig(
@ConfigProperty(defaultValue = "1_500_000") int delayBetweenBlockItems,
@ConfigProperty(defaultValue = "100_000") int maxBlockItemsToStream,
@ConfigProperty(defaultValue = "MILLIS_PER_BLOCK") StreamingMode streamingMode,
@ConfigProperty(defaultValue = "1000") int millisecondsPerBlock,
@ConfigProperty(defaultValue = "10") int millisecondsPerBlock,
@ConfigProperty(defaultValue = "1000") int blockItemsBatchSize) {

/**
Expand Down
6 changes: 3 additions & 3 deletions simulator/src/main/resources/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ grpc.port=8080
# ----------------------------------------------
# BlockStreamConfig
# ----------------------------------------------
blockStream.simulatorMode=PUBLISHER
blockStream.simulatorMode=CONSUMER
# ----------------------------------------------
# Prometheus Config
# ----------------------------------------------
Expand All @@ -19,8 +19,8 @@ blockStream.simulatorMode=PUBLISHER
# We might consider enabling this on a different
# port to track simulator metrics from a
# dashboard.
prometheus.endpointEnabled=false
prometheus.endpointPortNumber=9998
prometheus.endpointEnabled=true
prometheus.endpointPortNumber=9997
# ----------------------------------------------
# BlockAsFileLargeDataSets config
# ----------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ void testSimulatorMode() {
assertEquals(SimulatorMode.PUBLISHER, config.simulatorMode());
}

@Test
void testLastKnownStatusesCapacity() {
final int capacity = 20;
BlockStreamConfig config = getBlockStreamConfigBuilder()
.lastKnownStatusesCapacity(capacity)
.build();

assertEquals(capacity, config.lastKnownStatusesCapacity());
}

@Test
void testValidAbsolutePath() {
// Setup valid folder path and generation mode
Expand Down

0 comments on commit 79073e7

Please sign in to comment.