[MM-19914] Fix data races in WebSocketEvent (#13039)
* Make WebSocketEvent type immutable * Update code to use updated immutable WebSocketEvent type * Export WebSocketEvent fields and mark them as deprecated
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9ab7bee0a6
Коммит
80dd2915db
@@ -315,7 +315,7 @@ func TestNotifyClusterPluginEvent(t *testing.T) {
|
||||
for {
|
||||
select {
|
||||
case resp := <-webSocketClient.EventChannel:
|
||||
if resp.Event == model.WEBSOCKET_EVENT_PLUGIN_STATUSES_CHANGED && len(resp.Data["plugin_statuses"].([]interface{})) == 0 {
|
||||
if resp.EventType() == model.WEBSOCKET_EVENT_PLUGIN_STATUSES_CHANGED && len(resp.GetData()["plugin_statuses"].([]interface{})) == 0 {
|
||||
done <- true
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user