Commit 701a7823 authored by Georg Mittendorfer's avatar Georg Mittendorfer

Remove startup wait time for node info post processing.

parent 4c35b683
Pipeline #58259528 passed with stage
in 3 minutes and 23 seconds
......@@ -49,7 +49,7 @@ public class GetNodeInfoResponsePostProcessor {
this.powAvailable = powAvailable;
this.cacheTimeout = cacheTimeout;
this.globalNodeInfo = new NodeInfo();
this.validUntil = System.currentTimeMillis() + cacheTimeout.toMillis();
this.validUntil = System.currentTimeMillis();
}
public boolean accept(IriCommand request, ResponseEntity<String> response) {
......
......@@ -173,7 +173,6 @@ public class GetNodeInfoResponsePostProcessorTest {
@Test
public void whenUpdateGlobalNodeInfoThenUpdateOnlyIfOutdated() throws InterruptedException {
GetNodeInfoResponsePostProcessor postProcessor = new GetNodeInfoResponsePostProcessor(true, Duration.ofMillis(100));
TimeUnit.MILLISECONDS.sleep(100);
postProcessor.updateGlobalNodeInfo(List.of(
node(tips(4)),
node(tips(42)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment