surrealdb.java icon indicating copy to clipboard operation
surrealdb.java copied to clipboard

Feature: Unit test netty SurrealDBWebsocketClientProtocolHandler

Open phughk opened this issue 2 years ago • 0 comments

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

[email protected]

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

phughk avatar Aug 23 '23 17:08 phughk