Skip to content

Commit

Permalink
PR Review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Sep 4, 2024
1 parent ef7f0a9 commit 3210816
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.hedera.block.simulator;

import static java.lang.System.Logger.Level.INFO;

import com.swirlds.config.api.Configuration;
import com.swirlds.config.api.ConfigurationBuilder;
import com.swirlds.config.extensions.sources.ClasspathFileConfigSource;
Expand All @@ -40,7 +42,7 @@ private BlockStreamSimulator() {}
*/
public static void main(String[] args) throws IOException {

LOGGER.log(Logger.Level.INFO, "Starting Block Stream Simulator");
LOGGER.log(INFO, "Starting Block Stream Simulator");

ConfigurationBuilder configurationBuilder =
ConfigurationBuilder.create()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
*/
@ConfigData("grpc")
public record GrpcConfig(
@ConfigProperty(defaultValue = "localhost") @Min(0) @Max(65535) String serverAddress,
@ConfigProperty(defaultValue = "localhost") String serverAddress,
@ConfigProperty(defaultValue = "8080") @Min(0) @Max(65535) int port) {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/** The GenerationMode enum defines the modes of generation for the block stream. */
public enum GenerationMode {
/** Reads Blocks from a Folder. */
FOLDER,
DIR,
/** Generates Blocks from rules */
SELF
ADHOC
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void provideBlockStreamConfig() {
ConfigInjectionModule.provideBlockStreamConfig(configuration);

Assertions.assertNotNull(blockStreamConfig);
Assertions.assertEquals(GenerationMode.SELF, blockStreamConfig.generationMode());
Assertions.assertEquals(GenerationMode.ADHOC, blockStreamConfig.generationMode());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class GenerationModeTest {

@Test
void testGenerationMode() {
GenerationMode mode = GenerationMode.FOLDER;
assertEquals(GenerationMode.FOLDER, mode);
mode = GenerationMode.SELF;
assertEquals(GenerationMode.SELF, mode);
GenerationMode mode = GenerationMode.DIR;
assertEquals(GenerationMode.DIR, mode);
mode = GenerationMode.ADHOC;
assertEquals(GenerationMode.ADHOC, mode);
}
}

0 comments on commit 3210816

Please sign in to comment.