mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: test GetSeriesCount
This commit is contained in:
parent
4d936b1524
commit
dbd217b8f0
1 changed files with 13 additions and 0 deletions
|
@ -382,6 +382,19 @@ func testIndexDBCheckTSIDByName(db *indexDB, mns []MetricName, tsids []TSID, isC
|
|||
}
|
||||
}
|
||||
|
||||
// Check timerseriesCounters only for serial test.
|
||||
// Concurrent test may create duplicate timeseries, so GetSeriesCount
|
||||
// would return more timeseries than needed.
|
||||
if !isConcurrent {
|
||||
n, err := db.GetSeriesCount()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unexpected error in GetSeriesCount(): %s", err)
|
||||
}
|
||||
if n != uint64(len(timeseriesCounters)) {
|
||||
return fmt.Errorf("unexpected GetSeriesCount(); got %d; want %d", n, uint64(len(timeseriesCounters)))
|
||||
}
|
||||
}
|
||||
|
||||
// Try tag filters.
|
||||
for i := range mns {
|
||||
mn := &mns[i]
|
||||
|
|
Loading…
Reference in a new issue