From 03ee2133f6d49649cc6b27fbbb23cf9c62128ea8 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Tue, 21 Jan 2025 10:35:12 +0300
Subject: Intermediate changes
 commit_hash:cdae472f061820ed9998426cf0624c300468cdc8

---
 .../cpp/monlib/encode/prometheus/prometheus_decoder_ut.cpp   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'library/cpp')

diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder_ut.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder_ut.cpp
index 9299076f93..72e13a39dd 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_decoder_ut.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder_ut.cpp
@@ -68,12 +68,13 @@ Y_UNIT_TEST_SUITE(TPrometheusDecoderTest) {
     Y_UNIT_TEST(Minimal) {
         auto samples = Decode(
                 "minimal_metric 1.234\n"
+                "big_num 1.04671344e+10\n"
                 "another_metric -3e3 103948\n"
                 "# Even that:\n"
                 "no_labels{} 3\n"
                 "# HELP line for non-existing metric will be ignored.\n");
 
-        UNIT_ASSERT_EQUAL(samples.SamplesSize(), 3);
+        UNIT_ASSERT_EQUAL(samples.SamplesSize(), 4);
         {
             auto& s = samples.GetSamples(0);
             UNIT_ASSERT_EQUAL(s.GetMetricType(), NProto::EMetricType::GAUGE);
@@ -84,12 +85,19 @@ Y_UNIT_TEST_SUITE(TPrometheusDecoderTest) {
         {
             auto& s = samples.GetSamples(1);
             UNIT_ASSERT_EQUAL(s.GetMetricType(), NProto::EMetricType::GAUGE);
+            UNIT_ASSERT_EQUAL(1, s.LabelsSize());
+            ASSERT_LABEL_EQUAL(s.GetLabels(0), "sensor", "big_num");
+            ASSERT_DOUBLE_POINT(s, TInstant::Zero(), 1.04671344e+10);
+        }
+        {
+            auto& s = samples.GetSamples(2);
+            UNIT_ASSERT_EQUAL(s.GetMetricType(), NProto::EMetricType::GAUGE);
             UNIT_ASSERT_EQUAL(s.LabelsSize(), 1);
             ASSERT_LABEL_EQUAL(s.GetLabels(0), "sensor", "another_metric");
             ASSERT_DOUBLE_POINT(s, TInstant::MilliSeconds(103948), -3000.0);
         }
         {
-            auto& s = samples.GetSamples(2);
+            auto& s = samples.GetSamples(3);
             UNIT_ASSERT_EQUAL(s.GetMetricType(), NProto::EMetricType::GAUGE);
             UNIT_ASSERT_EQUAL(1, s.LabelsSize());
             ASSERT_LABEL_EQUAL(s.GetLabels(0), "sensor", "no_labels");
-- 
cgit v1.2.3