@@ -341,13 +341,31 @@ Y_UNIT_TEST_SUITE(Graph) {
341
341
// this call is needed to wait for establishing of pipe connection
342
342
{
343
343
NGraph::TEvGraph::TEvGetMetrics* event = new NGraph::TEvGraph::TEvGetMetrics ();
344
- event->Record .AddMetrics (" test.metric1 " );
344
+ event->Record .AddMetrics (" test.metric9 " );
345
345
runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
346
346
TAutoPtr<IEventHandle> handle;
347
347
NGraph::TEvGraph::TEvMetricsResult* response = runtime.GrabEdgeEventRethrow <NGraph::TEvGraph::TEvMetricsResult>(handle);
348
348
Ctest << " Received result: " << response->Record .ShortDebugString () << Endl;
349
349
}
350
350
351
+ Ctest << " Send old metrics..." << Endl;
352
+
353
+ {
354
+ NGraph::TEvGraph::TEvSendMetrics* event = new NGraph::TEvGraph::TEvSendMetrics ();
355
+ {
356
+ NKikimrGraph::TMetric* metric = event->Record .AddMetrics ();
357
+ metric->SetName (" test.metric0" );
358
+ metric->SetValue (13 );
359
+ }
360
+ {
361
+ NKikimrGraph::TMetric* metric = event->Record .AddMetrics ();
362
+ metric->SetName (" test.metric1" );
363
+ metric->SetValue (14 );
364
+ }
365
+ event->Record .SetTime (0 );
366
+ runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
367
+ }
368
+
351
369
runtime.SimulateSleep (TDuration::Seconds (1 ));
352
370
353
371
Ctest << " Filling..." << Endl;
@@ -356,7 +374,7 @@ Y_UNIT_TEST_SUITE(Graph) {
356
374
{
357
375
NGraph::TEvGraph::TEvSendMetrics* event = new NGraph::TEvGraph::TEvSendMetrics ();
358
376
NKikimrGraph::TMetric* metric = event->Record .AddMetrics ();
359
- metric->SetName (" test.metric1 " );
377
+ metric->SetName (" test.metric9 " );
360
378
metric->SetValue (seconds);
361
379
event->Record .SetTime (60 * minutes + seconds);
362
380
runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
@@ -367,7 +385,7 @@ Y_UNIT_TEST_SUITE(Graph) {
367
385
Ctest << " Checking..." << Endl;
368
386
{
369
387
NGraph::TEvGraph::TEvGetMetrics* event = new NGraph::TEvGraph::TEvGetMetrics ();
370
- event->Record .AddMetrics (" test.metric1 " );
388
+ event->Record .AddMetrics (" test.metric9 " );
371
389
runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
372
390
TAutoPtr<IEventHandle> handle;
373
391
NGraph::TEvGraph::TEvMetricsResult* response = runtime.GrabEdgeEventRethrow <NGraph::TEvGraph::TEvMetricsResult>(handle);
@@ -380,7 +398,7 @@ Y_UNIT_TEST_SUITE(Graph) {
380
398
{
381
399
NGraph::TEvGraph::TEvSendMetrics* event = new NGraph::TEvGraph::TEvSendMetrics ();
382
400
NKikimrGraph::TMetric* metric = event->Record .AddMetrics ();
383
- metric->SetName (" test.metric1 " );
401
+ metric->SetName (" test.metric9 " );
384
402
metric->SetValue (seconds);
385
403
runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
386
404
}
@@ -390,7 +408,7 @@ Y_UNIT_TEST_SUITE(Graph) {
390
408
Ctest << " Checking..." << Endl;
391
409
{
392
410
NGraph::TEvGraph::TEvGetMetrics* event = new NGraph::TEvGraph::TEvGetMetrics ();
393
- event->Record .AddMetrics (" test.metric1 " );
411
+ event->Record .AddMetrics (" test.metric9 " );
394
412
runtime.Send (NGraph::MakeGraphServiceId (), sender, event);
395
413
TAutoPtr<IEventHandle> handle;
396
414
NGraph::TEvGraph::TEvMetricsResult* response = runtime.GrabEdgeEventRethrow <NGraph::TEvGraph::TEvMetricsResult>(handle);
0 commit comments