(t *testing.T)
| 252 | } |
| 253 | |
| 254 | func TestStatsLoggerStopped(t *testing.T) { |
| 255 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll) |
| 256 | |
| 257 | sc := DefaultStartupConfig("") |
| 258 | |
| 259 | // Start up stats logger by creating server context |
| 260 | ctx := base.TestCtx(t) |
| 261 | svrctx := NewServerContext(ctx, &sc, false) |
| 262 | |
| 263 | // Close server context which will send signal to close stats logger |
| 264 | svrctx.Close(ctx) |
| 265 | |
| 266 | // ensure stats terminator is closed |
| 267 | _, ok := <-svrctx.statsContext.terminator |
| 268 | assert.False(t, ok) |
| 269 | |
| 270 | // sleep a bit to allow the "Stopping stats logging goroutine" debug logging to be printed |
| 271 | time.Sleep(time.Millisecond * 10) |
| 272 | } |
| 273 | |
| 274 | func TestObtainManagementEndpointsFromServerContext(t *testing.T) { |
| 275 | if base.UnitTestUrlIsWalrus() { |
nothing calls this directly
no test coverage detected