Switch chunk encoding to type 2 where it was hardcoded type 1 before
The chunk encoding was hardcoded there because it mostly doesn't matter what encoding is chosen in that test. Since type 1 is battle-hardened enough, I'm switching to type 2 here so that we can catch unexpected problems as a byproduct. My expectation is that the chunk encoding doesn't matter anyway, as said, but then "unexpected problems" contains the word "unexpected".
This commit is contained in:
parent
c72979e3ed
commit
4b574e8a61
|
@ -469,7 +469,7 @@ func (t *Test) clear() {
|
|||
}
|
||||
|
||||
var closer testutil.Closer
|
||||
t.storage, closer = local.NewTestStorage(t, 1)
|
||||
t.storage, closer = local.NewTestStorage(t, 2)
|
||||
|
||||
t.closeStorage = closer.Close
|
||||
t.queryEngine = NewEngine(t.storage, nil)
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
)
|
||||
|
||||
func TestRuleEval(t *testing.T) {
|
||||
storage, closer := local.NewTestStorage(t, 1)
|
||||
storage, closer := local.NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
engine := promql.NewEngine(storage, nil)
|
||||
now := model.Now()
|
||||
|
|
|
@ -31,7 +31,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMatches(t *testing.T) {
|
||||
storage, closer := NewTestStorage(t, 1)
|
||||
storage, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
storage.archiveHighWatermark = 90
|
||||
|
@ -266,7 +266,7 @@ func TestMatches(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFingerprintsForLabels(t *testing.T) {
|
||||
storage, closer := NewTestStorage(t, 1)
|
||||
storage, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
samples := make([]*model.Sample, 100)
|
||||
|
@ -348,7 +348,7 @@ func TestFingerprintsForLabels(t *testing.T) {
|
|||
var benchLabelMatchingRes map[model.Fingerprint]metric.Metric
|
||||
|
||||
func BenchmarkLabelMatching(b *testing.B) {
|
||||
s, closer := NewTestStorage(b, 1)
|
||||
s, closer := NewTestStorage(b, 2)
|
||||
defer closer.Close()
|
||||
|
||||
h := fnv.New64a()
|
||||
|
@ -444,7 +444,7 @@ func TestRetentionCutoff(t *testing.T) {
|
|||
now := model.Now()
|
||||
insertStart := now.Add(-2 * time.Hour)
|
||||
|
||||
s, closer := NewTestStorage(t, 1)
|
||||
s, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
// Stop maintenance loop to prevent actual purging.
|
||||
|
@ -498,7 +498,7 @@ func TestDropMetrics(t *testing.T) {
|
|||
now := model.Now()
|
||||
insertStart := now.Add(-2 * time.Hour)
|
||||
|
||||
s, closer := NewTestStorage(t, 1)
|
||||
s, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
chunkFileExists := func(fp model.Fingerprint) (bool, error) {
|
||||
|
@ -605,7 +605,7 @@ func TestQuarantineMetric(t *testing.T) {
|
|||
now := model.Now()
|
||||
insertStart := now.Add(-2 * time.Hour)
|
||||
|
||||
s, closer := NewTestStorage(t, 1)
|
||||
s, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
chunkFileExists := func(fp model.Fingerprint) (bool, error) {
|
||||
|
@ -1763,7 +1763,7 @@ func verifyStorageSequential(t testing.TB, s *memorySeriesStorage, samples model
|
|||
}
|
||||
|
||||
func TestAppendOutOfOrder(t *testing.T) {
|
||||
s, closer := NewTestStorage(t, 1)
|
||||
s, closer := NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
|
||||
m := model.Metric{
|
||||
|
|
|
@ -189,7 +189,7 @@ func TestTemplateExpansion(t *testing.T) {
|
|||
|
||||
time := model.Time(0)
|
||||
|
||||
storage, closer := local.NewTestStorage(t, 1)
|
||||
storage, closer := local.NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
storage.Append(&model.Sample{
|
||||
Metric: model.Metric{
|
||||
|
|
|
@ -87,7 +87,7 @@ func TestQuery(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
storage, closer := local.NewTestStorage(t, 1)
|
||||
storage, closer := local.NewTestStorage(t, 2)
|
||||
defer closer.Close()
|
||||
storage.Append(&model.Sample{
|
||||
Metric: model.Metric{
|
||||
|
|
Loading…
Reference in New Issue