cph-cachet / carp.core-kotlin

Infrastructure-agnostic framework for distributed data collection.
https://carp.cachet.dk/core/
MIT License
21 stars 3 forks source link

Fix: redeploying devices incorrectly opened data streams #413

Closed Whathecode closed 2 years ago

Whathecode commented 2 years ago

Redeploying devices would fail since upon device deployment DataStreamService.openDataStreams is called, which on a second call would throw an exception indicating data streams were already open (Closes #383).

This is now fixed simply by swallowing the exception, since the requested data streams are known not to have changed.

However, this can probably be improved by changing the endpoints behavior, but this would be a breaking API change, thus I scheduled this for 2.0 instead.

While looking into this, I added additional tests covering getDeviceDeploymentFor, one of which is part of the backwards compatibility tests and thus got added to test resources.