Mercurial > stress-tester
changeset 1183:934772a77136
NcEventSource - configuration bugfix
author | Devel 2 |
---|---|
date | Wed, 17 Jun 2020 12:18:01 +0200 |
parents | 37b399460a0c |
children | 7941b4eadd4b |
files | stress-tester/src/main/java/com/passus/st/source/NcEventSource.java |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/source/NcEventSource.java Wed Jun 17 12:15:05 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/source/NcEventSource.java Wed Jun 17 12:18:01 2020 +0200 @@ -33,7 +33,6 @@ import static com.passus.config.schema.ConfigurationSchemaBuilder.*; import static com.passus.st.Protocols.*; import static com.passus.st.config.CommonNodeDefs.INT_GREATER_EQUAL_ZERO_DEF; -import static com.passus.st.config.CommonNodeDefs.STRING_DEF; /** * @author Mirosław Hawrot @@ -46,6 +45,8 @@ public static final String TYPE = "nc"; + private static final int DEFAULT_LOOPS = 1; + private String ncFile; private NcDataBlockReader reader; @@ -72,7 +73,7 @@ private ByteBuffAllocator allocator = new DefaultByteBuffAllocator(); - private int loops = 1; + private int loops = DEFAULT_LOOPS; public NcEventSource() { } @@ -155,7 +156,7 @@ @Override public void configure(Configuration config, ConfigurationContext context) { ncFile = config.getString("fileName"); - loops = config.getInteger("loops"); + loops = config.getInteger("loops", DEFAULT_LOOPS); } @Override