openbase / bco.dal

Domotic Abstraction Layer
Other
1 stars 2 forks source link

Timeout of the initial status request #129

Closed pLeminoq closed 5 years ago

pLeminoq commented 5 years ago

This issue is the reason why currently many of the device manager tests fail. The best way to reproduce this issue is by running restRegisteringManyDeviceTest in DalRegisterDeviceTest. It can be seen that between lines 4 and 5, where requesting the status fails, the timeout of 15 seconds runs out. The strange thing about this is that the controller responds to a ping of the remote as seen in line 3 but does not even seem to receive the request data call afterwards. If the controller would receive the method call it should respond as seen in line 7.

1 - 19:04:47.559 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] sync task callable running
2 - 19:04:47.562 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] trigger internal request status
3 - 19:04:47.574 [pool-1-thread-94] WARN  o.o.b.d.l.l.u.ColorableLightController Unit ColorableLight-10 ping called
4 - 19:04:47.575 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] GET internal request status
5 - 19:05:02.575 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] GET internal request status failed
6 - 19:05:02.575 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] trigger internal request status
7 - 19:05:02.577 [pool-1-thread-87] WARN  o.o.b.d.l.l.u.ColorableLightController Unit ColorableLight-10 request data authenticated
8 - 19:05:02.578 [pool-1-thread-92] WARN  o.o.b.d.l.l.u.ColorableLightController Unit ColorableLight-10 ping called
9 - 19:05:02.578 [pool-1-thread-86] WARN  o.o.b.d.r.u.ColorableLightRemote ColorableLightRemote[scope:/paradise/colorablelight/simpledevice2colorablelight0/, ColorableLight-10] GET internal request status
10 - 19:05:02.580 [pool-1-thread-87] WARN  o.o.b.d.l.l.u.ColorableLightController Unit ColorableLight-10 request data authenticated returned
pLeminoq commented 5 years ago

Should be fixed with commit openbase/jul@e2778e6a550c9b5931a6622e5120585e666a7148. The problem was that the request went out before the ping. So after the ping responded it would be waited for the request timeout for 15 seconds. Now the ping is performed first and the controller will only answer to it if its middleware is completely active.

DivineThreepwood commented 5 years ago

Fix confirmed.