(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestBlipStatsBasic(t *testing.T) { |
| 37 | bt := NewBlipTester(t) |
| 38 | defer bt.Close() |
| 39 | |
| 40 | // make sure requests have not incremented stats. |
| 41 | /// Note: there is a blip call in NewBlipTester to initialize collections |
| 42 | dbStats := bt.restTester.GetDatabase().DbStats.Database() |
| 43 | require.Equal(t, int64(0), dbStats.ReplicationBytesReceived.Value()) |
| 44 | require.Equal(t, int64(0), dbStats.ReplicationBytesSent.Value()) |
| 45 | |
| 46 | // send a request, close BlipSyncContext and make sure stats are incremented |
| 47 | sendGetCheckpointRequest(bt) |
| 48 | |
| 49 | // requests shouldn't be implemented as part of handler |
| 50 | require.Equal(t, int64(0), dbStats.ReplicationBytesReceived.Value()) |
| 51 | require.Equal(t, int64(0), dbStats.ReplicationBytesSent.Value()) |
| 52 | |
| 53 | bt.sender.Close() |
| 54 | |
| 55 | waitForStatGreaterThan(t, dbStats.ReplicationBytesReceived.Value, 1) |
| 56 | waitForStatGreaterThan(t, dbStats.ReplicationBytesSent.Value, 1) |
| 57 | |
| 58 | } |
| 59 | |
| 60 | func TestBlipStatsFastReport(t *testing.T) { |
| 61 | bt := NewBlipTester(t) |
nothing calls this directly
no test coverage detected