mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-12 14:07:28 +00:00
Fix discovery test Prometheus metric collision
Remove t.Parallel() from tests that verify global Prometheus gauge values. When tests run in parallel, they update the same global gauges (discoveryScanServers, discoveryScanErrors) causing race conditions and incorrect metric values. Fixes test failure in workflow run 19281332332: - TestPerformScanRecordsHistoryAndMetrics expected 2 servers, got 1 Related to release workflow preflight tests.
This commit is contained in:
parent
b41f8a2ac4
commit
bbe11d1e7f
1 changed files with 0 additions and 4 deletions
|
|
@ -35,8 +35,6 @@ func (f *fakeScanner) DiscoverServersWithCallbacks(ctx context.Context, subnet s
|
|||
}
|
||||
|
||||
func TestPerformScanRecordsHistoryAndMetrics(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
service := NewService(nil, time.Minute, "192.168.1.0/24", func() config.DiscoveryConfig {
|
||||
cfg := config.DefaultDiscoveryConfig()
|
||||
cfg.SubnetBlocklist = []string{"10.0.0.0/24", "172.16.0.0/24"}
|
||||
|
|
@ -103,8 +101,6 @@ func TestPerformScanRecordsHistoryAndMetrics(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestPerformScanRecordsPartialFailure(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
service := NewService(nil, time.Minute, "auto", func() config.DiscoveryConfig {
|
||||
cfg := config.DefaultDiscoveryConfig()
|
||||
return cfg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue