(t *testing.T)
| 695 | } |
| 696 | |
| 697 | func TestReleaseNoninternedString(t *testing.T) { |
| 698 | for _, protoMsg := range []remoteapi.WriteMessageType{remoteapi.WriteV1MessageType, remoteapi.WriteV2MessageType} { |
| 699 | t.Run(fmt.Sprint(protoMsg), func(t *testing.T) { |
| 700 | _, m := newTestClientAndQueueManager(t, defaultFlushDeadline, protoMsg) |
| 701 | m.Start() |
| 702 | defer m.Stop() |
| 703 | for i := 1; i < 1000; i++ { |
| 704 | m.StoreSeries([]record.RefSeries{ |
| 705 | { |
| 706 | Ref: chunks.HeadSeriesRef(i), |
| 707 | Labels: labels.FromStrings("asdf", strconv.Itoa(i)), |
| 708 | }, |
| 709 | }, 0) |
| 710 | m.SeriesReset(1) |
| 711 | } |
| 712 | |
| 713 | metric := client_testutil.ToFloat64(noReferenceReleases) |
| 714 | require.Equal(t, 0.0, metric, "expected there to be no calls to release for strings that were not already interned: %d", int(metric)) |
| 715 | }) |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | func TestShouldReshard(t *testing.T) { |
| 720 | type testcase struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…