MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestUptimeStat

Function TestUptimeStat

rest/api_test.go:2604–2616  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2602}
2603
2604func TestUptimeStat(t *testing.T) {
2605 rt := NewRestTester(t, nil)
2606 defer rt.Close()
2607
2608 uptime1, err := strconv.Atoi(base.SyncGatewayStats.GlobalStats.ResourceUtilizationStats().Uptime.String())
2609 require.NoError(t, err)
2610 time.Sleep(10 * time.Nanosecond)
2611
2612 uptime2, err := strconv.Atoi(base.SyncGatewayStats.GlobalStats.ResourceUtilizationStats().Uptime.String())
2613 require.NoError(t, err)
2614 log.Printf("uptime1: %d, uptime2: %d", uptime1, uptime2)
2615 assert.True(t, uptime1 < uptime2)
2616}
2617
2618func TestDocumentChannelHistory(t *testing.T) {
2619 defer db.SuspendSequenceBatching()()

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
NewRestTesterFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected