@@ -87,16 +87,15 @@ func TestPGStatWalReceiverCollectorWithFlushedLSN(t *testing.T) {
8787 }
8888 }()
8989 expected := []MetricResult {
90- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : - 1.0 , metricType : dto .MetricType_GAUGE },
91- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1200668684563608 , metricType : dto .MetricType_COUNTER },
92- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321285 , metricType : dto .MetricType_GAUGE },
93- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1200668684563609 , metricType : dto .MetricType_COUNTER },
94- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321280 , metricType : dto .MetricType_GAUGE },
95- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321275 , metricType : dto .MetricType_COUNTER },
96- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321276 , metricType : dto .MetricType_COUNTER },
97- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1200668684563610 , metricType : dto .MetricType_COUNTER },
98- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321277 , metricType : dto .MetricType_COUNTER },
99- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 5 , metricType : dto .MetricType_GAUGE },
90+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1200668684563608 , metricType : dto .MetricType_COUNTER },
91+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1687321285 , metricType : dto .MetricType_GAUGE },
92+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1200668684563609 , metricType : dto .MetricType_COUNTER },
93+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1687321280 , metricType : dto .MetricType_GAUGE },
94+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1687321275 , metricType : dto .MetricType_COUNTER },
95+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1687321276 , metricType : dto .MetricType_COUNTER },
96+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1200668684563610 , metricType : dto .MetricType_COUNTER },
97+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 1687321277 , metricType : dto .MetricType_COUNTER },
98+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "stopping" }, value : 5 , metricType : dto .MetricType_GAUGE },
10099 }
101100 convey .Convey ("Metrics comparison" , t , func () {
102101 for _ , expect := range expected {
@@ -165,15 +164,14 @@ func TestPGStatWalReceiverCollectorWithNoFlushedLSN(t *testing.T) {
165164 }
166165 }()
167166 expected := []MetricResult {
168- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1.0 , metricType : dto .MetricType_GAUGE },
169- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1200668684563608 , metricType : dto .MetricType_COUNTER },
170- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321285 , metricType : dto .MetricType_GAUGE },
171- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321280 , metricType : dto .MetricType_GAUGE },
172- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321275 , metricType : dto .MetricType_COUNTER },
173- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321276 , metricType : dto .MetricType_COUNTER },
174- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1200668684563610 , metricType : dto .MetricType_COUNTER },
175- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 1687321277 , metricType : dto .MetricType_COUNTER },
176- {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" }, value : 5 , metricType : dto .MetricType_GAUGE },
167+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1200668684563608 , metricType : dto .MetricType_COUNTER },
168+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1687321285 , metricType : dto .MetricType_GAUGE },
169+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1687321280 , metricType : dto .MetricType_GAUGE },
170+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1687321275 , metricType : dto .MetricType_COUNTER },
171+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1687321276 , metricType : dto .MetricType_COUNTER },
172+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1200668684563610 , metricType : dto .MetricType_COUNTER },
173+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 1687321277 , metricType : dto .MetricType_COUNTER },
174+ {labels : labelMap {"upstream_host" : "foo" , "slot_name" : "bar" , "status" : "starting" }, value : 5 , metricType : dto .MetricType_GAUGE },
177175 }
178176 convey .Convey ("Metrics comparison" , t , func () {
179177 for _ , expect := range expected {
0 commit comments