@@ -87,16 +87,15 @@ func TestPGStatWalReceiverCollectorWithFlushedLSN(t *testing.T) {
87
87
}
88
88
}()
89
89
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 },
100
99
}
101
100
convey .Convey ("Metrics comparison" , t , func () {
102
101
for _ , expect := range expected {
@@ -165,15 +164,14 @@ func TestPGStatWalReceiverCollectorWithNoFlushedLSN(t *testing.T) {
165
164
}
166
165
}()
167
166
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 },
177
175
}
178
176
convey .Convey ("Metrics comparison" , t , func () {
179
177
for _ , expect := range expected {
0 commit comments