(t *testing.T)
| 419 | } |
| 420 | |
| 421 | func TestSampleDeliveryOrder(t *testing.T) { |
| 422 | t.Parallel() |
| 423 | for _, protoMsg := range []remoteapi.WriteMessageType{remoteapi.WriteV1MessageType, remoteapi.WriteV2MessageType} { |
| 424 | t.Run(fmt.Sprint(protoMsg), func(t *testing.T) { |
| 425 | ts := 10 |
| 426 | n := config.DefaultQueueConfig.MaxSamplesPerSend * ts |
| 427 | recs := testwal.GenerateRecords(recCase{ |
| 428 | NoST: protoMsg == remoteapi.WriteV1MessageType, // RW1 does not support ST. |
| 429 | Series: n, SamplesPerSeries: 1, |
| 430 | }) |
| 431 | |
| 432 | c, m := newTestClientAndQueueManager(t, defaultFlushDeadline, protoMsg) |
| 433 | c.expectSamples(recs.Samples, recs.Series) |
| 434 | m.StoreSeries(recs.Series, 0) |
| 435 | |
| 436 | m.Start() |
| 437 | defer m.Stop() |
| 438 | // These should be received by the client. |
| 439 | m.Append(recs.Samples) |
| 440 | c.waitForExpectedData(t, 30*time.Second) |
| 441 | }) |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | func TestShutdown(t *testing.T) { |
| 446 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…