matteodri / owl-energy-monitor

Java application to expose Owl Intuition data through Prometheus and Grafana
MIT License
2 stars 0 forks source link

ConsoleApplicationTest failing #11

Closed matteodri closed 4 years ago

matteodri commented 4 years ago

This is probably due to a timing issue

[ERROR] Failures: 
[ERROR]   ConsoleApplicationTest.run:62 
Wanted but not invoked:
owlMessageProcessor.process(
    <any java.net.InetAddress>,
    "<these are the contents of a multicast message!>"
);
-> at com.matteodri.owlenergymonitor.ConsoleApplicationTest.run(ConsoleApplicationTest.java:62)
Actually, there were zero interactions with this mock.

[ERROR] Errors: 
[ERROR]   ConsoleApplicationTest ? Mockito 

No tests found in ConsoleApplicationTest
Is...
[INFO] 
[ERROR] Tests run: 15, Failures: 1, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.811 s
matteodri commented 4 years ago

This could be replaced with a service test that brings up the whole Spring context, publishes a broadcast message and verifies data exposed under actuator/prometheus includes the new data. Using @SpringBootTest the application is started