Skip to content

Commit

Permalink
Fixed examples scenarios.
Browse files Browse the repository at this point in the history
  • Loading branch information
espentj committed Sep 14, 2021
1 parent 95b6ed8 commit 18ca4ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import static org.junit.Assert.assertEquals;

@ActiveProfiles("test")
@SpringBootTest(classes=SimulatorBoxUnit.class)
@SpringBootTest(classes = SimulatorBoxUnit.class)
@RunWith(SpringRunner.class)
public class SimulatorBoxUnitTest {

Expand All @@ -58,7 +58,7 @@ public void testStreamFromSimulatorBox() {
AtomicInteger consumed = new AtomicInteger();

Consumer<List<PartitionKeyValueEntry<DASMeasurementKey, DASMeasurement>>> logOutput = value -> {
for (PartitionKeyValueEntry<DASMeasurementKey, DASMeasurement> entry: value) {
for (PartitionKeyValueEntry<DASMeasurementKey, DASMeasurement> entry : value) {
DASMeasurement measurement = entry.value;
LocalDateTime ldt = Instant.ofEpochMilli(measurement.getStartSnapshotTimeNano() / millisInNano).atZone(ZoneId.systemDefault()).toLocalDateTime();

Expand All @@ -72,7 +72,7 @@ public void testStreamFromSimulatorBox() {
CountDownLatch latch = new CountDownLatch(1);
simulatorBoxUnit.produce()
.subscribe(logOutput,
(ex) -> logger.info("Error emitted: " + ex.getMessage()),
(ex) -> logger.info("Error emitted: " + ex.getMessage()),
latch::countDown);

Helpers.wait(latch);
Expand Down
22 changes: 11 additions & 11 deletions simulator-box-unit/src/test/resources/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ das:
box:
simulator:
amplitudeDataType: float
numberOfShots: ${NUMBER_OF_SHOTS:10}
secondsToRun: ${SECONDS_TO_RUN:5}
pulseRate: ${PULSE_RATE:10000}
maxFreq: ${MAX_NYQ_FREQ:5000}
minFreq: ${MIN_NYQ_FREQ:0}
numberOfShots: 10
secondsToRun: 5
pulseRate: 10000
maxFreq: 5000
minFreq: 0
boxUUID: ${BOX_UUID}
opticalPathUUID: ${OPTICAL_PATH_UUID}
spatialSamplingInterval: ${SPATIAL_SAMPLING_INTERVAL:1.1}
pulseWidth: ${PULSE_WIDTH:100.50}
startLocusIndex: ${START_LOCUS_INDEX:0}
disableThrottling: ${DISABLE_THROTTLING:0}
gaugeLength: ${GAUGE_LENGTH:10.209524}
numberOfLoci: ${NUMBER_OF_LOCI:3}
spatialSamplingInterval: 1.1
pulseWidth: 100.50
startLocusIndex: 0
disableThrottling: true
gaugeLength: 10.209524
numberOfLoci: 3
numberOfPrePopulatedValues: 100
amplitudesPrPackage: 8192
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import reactor.core.publisher.Flux;

import java.util.List;
import java.util.function.Consumer;

/**
* Minimal
Expand Down

0 comments on commit 18ca4ce

Please sign in to comment.