locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
475 stars 128 forks source link

Run server on a regular tokio task in tests #323

Closed einarmo closed 2 months ago

einarmo commented 2 months ago

I missed this in my original client implementation. Using spawn_blocking means that tests tend to not terminate if something goes wrong, but the server is async, so that is just completely unnecessary. This neatly handles panics in tasks and properly finishes the test if something goes wrong.