MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / TestStatusManager_InitialState

Function TestStatusManager_InitialState

status_manager_test.go:100–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestStatusManager_InitialState(t *testing.T) {
101 sm := NewStatusManager(DefaultStatusManagerConfig())
102
103 if sm.isClosingOrClosed() {
104 t.Fatal("expected StatusManager to start open for work")
105 }
106
107 select {
108 case <-sm.closedCh:
109 t.Fatal("expected closedCh to remain open before Close()")
110 default:
111 }
112
113 select {
114 case <-sm.Context().Done():
115 t.Fatal("expected Context to not be cancelled before Close()")
116 default:
117 }
118}
119
120func TestStatusManager_StartRollbackOnFailure(t *testing.T) {
121 sm := NewStatusManager(DefaultStatusManagerConfig())

Callers

nothing calls this directly

Calls 5

isClosingOrClosedMethod · 0.95
ContextMethod · 0.95
NewStatusManagerFunction · 0.85
DoneMethod · 0.45

Tested by

no test coverage detected