(t *testing.T)
| 389 | } |
| 390 | |
| 391 | func TestSampleDeliveryTimeout(t *testing.T) { |
| 392 | t.Parallel() |
| 393 | for _, protoMsg := range []remoteapi.WriteMessageType{remoteapi.WriteV1MessageType, remoteapi.WriteV2MessageType} { |
| 394 | t.Run(fmt.Sprint(protoMsg), func(t *testing.T) { |
| 395 | recs := testwal.GenerateRecords(recCase{ |
| 396 | NoST: protoMsg == remoteapi.WriteV1MessageType, // RW1 does not support ST. |
| 397 | Series: 10, SamplesPerSeries: 10, |
| 398 | }) |
| 399 | cfg := testDefaultQueueConfig() |
| 400 | mcfg := config.DefaultMetadataConfig |
| 401 | cfg.MaxShards = 1 |
| 402 | |
| 403 | c := NewTestWriteClient(protoMsg) |
| 404 | m := newTestQueueManager(t, cfg, mcfg, defaultFlushDeadline, c, protoMsg) |
| 405 | m.StoreSeries(recs.Series, 0) |
| 406 | m.Start() |
| 407 | defer m.Stop() |
| 408 | |
| 409 | // Send the samples twice, waiting for the samples in the meantime. |
| 410 | c.expectSamples(recs.Samples, recs.Series) |
| 411 | m.Append(recs.Samples) |
| 412 | c.waitForExpectedData(t, 30*time.Second) |
| 413 | |
| 414 | c.expectSamples(recs.Samples, recs.Series) |
| 415 | m.Append(recs.Samples) |
| 416 | c.waitForExpectedData(t, 30*time.Second) |
| 417 | }) |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | func TestSampleDeliveryOrder(t *testing.T) { |
| 422 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…