File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
spec/prometheus/client/data_stores Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 307307
308308 allow ( Process ) . to receive ( :pid ) . and_return ( 12345 )
309309 metric_store1 . set ( labels : { foo : "bar" } , val : 1 )
310+
310311 allow ( Process ) . to receive ( :pid ) . and_return ( 23456 )
311- metric_store2 . set ( labels : { foo : "bar" } , val : 3 )
312- allow ( Process ) . to receive ( :pid ) . and_return ( 12345 )
313- metric_store1 . set ( labels : { foo : "baz" } , val : 7 )
314- allow ( Process ) . to receive ( :pid ) . and_return ( 23456 )
312+ metric_store2 . set ( labels : { foo : "bar" } , val : 3 ) # Supercedes 'bar' in PID 12345
315313 metric_store2 . set ( labels : { foo : "baz" } , val : 2 )
316- allow ( Process ) . to receive ( :pid ) . and_return ( 12345 )
317- metric_store1 . set ( labels : { foo : "baz" } , val : 4 )
318- allow ( Process ) . to receive ( :pid ) . and_return ( 23456 )
319314 metric_store2 . set ( labels : { foo : "zzz" } , val : 1 )
320- metric_store2 . set ( labels : { foo : "yyy" } , val : 3 )
315+
316+ allow ( Process ) . to receive ( :pid ) . and_return ( 12345 )
317+ metric_store1 . set ( labels : { foo : "baz" } , val : 4 ) # Supercedes 'baz' in PID 23456
321318
322319 expect ( metric_store1 . all_values ) . to eq (
323320 { foo : "bar" } => 3.0 ,
324321 { foo : "baz" } => 4.0 ,
325322 { foo : "zzz" } => 1.0 ,
326- { foo : "yyy" } => 3.0 ,
327323 )
328324
329325 # Both processes should return the same value
You can’t perform that action at this time.
0 commit comments