fabric8io / mockwebserver

An extension of okhttp's mockwebserver, that provides a DSL and is easier to use
Apache License 2.0
113 stars 38 forks source link

#71 Add closing message to websocket #72

Closed speedfl closed 2 years ago

speedfl commented 2 years ago

Reference: https://github.com/fabric8io/mockwebserver/issues/71

Purpose is to be able to send a closing message to the websocket. When running a kubernetes exec, a io.fabric8.kubernetes.api.model.Status is sent (ref: https://github.com/fabric8io/kubernetes-client/issues/3793)

This allows to write:

.waitFor(1500).andEmit(new WebsocketCloseReason(1000, "json representation of the status"))