surrealdb / surrealdb.java

SurrealDB SDK for Java
https://surrealdb.com
Apache License 2.0
67 stars 21 forks source link

Feature: Unit test netty SurrealDBWebsocketClientProtocolHandler #74

Closed phughk closed 1 week ago

phughk commented 1 year ago

Is your feature request related to a problem?

We have a protocol handler for the SurrealDB websocket plaintext protocol called SurrealDBWebsocketClientProtocolHandler.

We should have unit tests for the methods available in that handler.

Describe the solution

We can use netty EmbeddedChannel to control the data going into the handler. That way we can verify the websocket is sending correct requests as well as handling responses correctly.

Alternative methods

integration tests. We have them, we don't want to rely on them. Unit tests are perfect for refactors.

SurrealDB version

1.0.0-beta.9+20230821.0665e1b7 for macos on aarch64

Contact Details

hugh@surrealdb.com

Is there an existing issue for this?

Code of Conduct

emmanuel-keller commented 1 week ago

Netty is not anymore a dependence in v0.2.0