← Back to Docs20250627

041 SLEEP SLOP plan

Documentation for 041_SLEEP_SLOP_plan from the Foundation repository.

Sleep Slop Action Plan

This document outlines the plan to address and eliminate Process.sleep and :timer.sleep calls from the test suite. Each instance has been categorized to prioritize the refactoring effort.

Categories:

  • Dummy Process: spawn(fn -> Process.sleep(:infinity) end) or similar. These are used to create long-lived PIDs for testing registries, supervisors, etc. They are generally acceptable in tests and are the lowest priority to change.
  • Flaky Test: Process.sleep(t) or :timer.sleep(t) where t is a fixed integer. This is a code smell indicating a race condition. The test is waiting an arbitrary amount of time, hoping an asynchronous action has completed. These are the highest priority to fix. They must be replaced with deterministic methods like waiting for a specific message, polling a state-change function, or using telemetry events.
  • Simulated Work: Process.sleep(variable) or :timer.sleep(variable). The sleep duration is dynamic. These are often legitimate uses in tests that simulate work, test timeouts, or check time-based features (rate limiters, circuit breakers). These should be reviewed but are lower priority than flaky tests.
  • Commented Out: The sleep call is commented out and currently inactive. These should be removed.

Analysis and Action Plan

FileLineCodeCategoryAction Plan
foundation/services/service_behaviour_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs111Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs118Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs125Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs153Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs160Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs167Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/services/service_behaviour_test.exs201Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/properties.ex111Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/properties.ex115live_pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex133pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex152pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex171pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex188pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex208pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex225pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex248pid = spawn(fn -> Process.sleep(100) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/properties.ex251Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/properties.ex259new_pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/properties.ex270spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry/backend/enhanced_ets_test.exs48agent_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs78agent_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs111agent_pid = spawn(fn -> Process.sleep(5000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs150agent_pid = spawn(fn -> Process.sleep(2000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs180agent_pid = spawn(fn -> Process.sleep(100) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs220agent_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry/backend/enhanced_ets_test.exs258agent_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry_optimizations_test.exs40pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs63pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs74pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs81Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry_optimizations_test.exs91pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs100pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs107Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry_optimizations_test.exs118pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs140existing_pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs144{test_namespace, :new_service_1, spawn(fn -> Process.sleep(:infinity) end), %{type: :new}},Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs145{test_namespace, :conflicting_service, spawn(fn -> Process.sleep(:infinity) end),Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs147{test_namespace, :new_service_2, spawn(fn -> Process.sleep(:infinity) end), %{type: :new}}Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs168pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs181pid1 = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs182pid2 = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_optimizations_test.exs199Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
foundation/process_registry_performance_test.exs40pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_performance_test.exs66pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_performance_test.exs120pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_performance_test.exs161spawn(fn -> Process.sleep(:infinity) end),Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_performance_test.exs180pid = spawn(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
foundation/process_registry_performance_test.exs222Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs32Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs55Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs60Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs84Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs88Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs124Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs148Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs165Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs183Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs187Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/cross_service_integration_test.exs211Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs50Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs80Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs108Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs125Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs139Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs156Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/config_events_telemetry_test.exs179Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs26Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs53Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs61Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs112Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs120Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs134Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs148Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs162Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs176Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs184Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs200Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs214Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs222Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs236Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs250Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/foundation/service_lifecycle_test.exs253# Process.sleep(10) # Small delayCommented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs254# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs255# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs256# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs257# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs258# Process.sleep(1100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs259# Process.sleep(200)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs260# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs261# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs262# Process.sleep(200)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs263# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs264# Process.sleep(50)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs265# Process.sleep(100)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs266# Process.sleep(1)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs267# Process.sleep(10)Commented OutRemove this commented out line.
integration/foundation/service_lifecycle_test.exs270Process.sleep(50 * attempt)Simulated WorkMedium Priority: This is used for backoff. It’s acceptable but could be replaced with a more deterministic polling helper.
integration/foundation/service_lifecycle_test.exs273Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/data_consistency_integration_test.exs26Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/data_consistency_integration_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/data_consistency_integration_test.exs148Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/data_consistency_integration_test.exs280Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/graceful_degradation_integration_test.exs88Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
integration/graceful_degradation_integration_test.exs151Process.sleep(500)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_hierarchical_test.exs308:timer.sleep(processing_time)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
mabeam/core_test.exs15Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/core_test.exs200Process.sleep(delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
mabeam/agent_registry_test.exs60Process.sleep(delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
mabeam/agent_registry_test.exs325Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/agent_registry_test.exs347Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/comms_test.exs42Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/comms_test.exs150Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/comms_test.exs200Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/performance_monitor_test.exs50Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_test.exs148Process.sleep(20)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_test.exs152Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_test.exs159Process.sleep(20)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_test.exs163Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/coordination_test.exs167Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/agent_test.exs220service_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/agent_supervisor_test.exs38Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/integration/stress_test.exs118Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/integration/stress_test.exs160Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/integration/stress_test.exs200Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/integration/stress_test.exs201if rem(i, 50) == 0, do: Process.sleep(10)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
mabeam/integration/stress_test.exs204Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/integration/stress_test.exs207:timer.sleep(:rand.uniform(5))Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
mabeam/integration/simple_stress_test.exs16Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/process_registry_test.exs80Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/process_registry_test.exs90Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/process_registry_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
mabeam/telemetry_test.exs120Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/beam/processes_properties_test.exs100:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/beam/processes_properties_test.exs103:timer.sleep(work_duration)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
property/foundation/beam/processes_properties_test.exs106:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/beam/processes_properties_test.exs109:timer.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/beam/processes_properties_test.exs112:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/beam/processes_properties_test.exs115:timer.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/infrastructure/rate_limiter_properties_test.exs100Process.sleep(short_window + 50)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
property/foundation/infrastructure/circuit_breaker_properties_test.exs100Process.sleep(short_timeout + 100)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
property/foundation/config_validation_properties_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/event_correlation_properties_test.exs100Process.sleep(1)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/event_correlation_properties_test.exs103Process.sleep(1)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
property/foundation/event_correlation_properties_test.exs106Process.sleep(1)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs15:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs33fake_pid = spawn(fn -> Process.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs48fake_pid = spawn(fn -> Process.sleep(5000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs80Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs83:timer.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs86:timer.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs89:timer.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs92:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
security/privilege_escalation_test.exs95Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
smoke/system_smoke_test.exs100:timer.sleep(1)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
smoke/system_smoke_test.exs103test_pid = spawn(fn -> :timer.sleep(1000) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
stress/chaos_resilience_test.exs100:timer.sleep(cooldown_period)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
stress/chaos_resilience_test.exs103:timer.sleep(:rand.uniform(50))Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
stress/chaos_resilience_test.exs106:timer.sleep(interval)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
stress/chaos_resilience_test.exs109:timer.sleep(1000)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
stress/sustained_load_stress_test.exs100:timer.sleep(:rand.uniform(10))Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
stress/sustained_load_stress_test.exs103:timer.sleep(check_interval)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/telemetry_helpers.exs100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/telemetry_helpers.exs103Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/test_process_manager.ex100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/test_process_manager.ex103Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/unified_registry_helpers.ex100{:ok, pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
support/test_supervisor.ex100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/test_supervisor.ex103Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/concurrent_test_helpers.ex100:timer.sleep(check_interval)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/concurrent_test_helpers.ex103:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/concurrent_test_helpers.ex106# Sleep to maintain rateCommented OutRemove this commented out line.
support/concurrent_test_helpers.ex107:timer.sleep(interval)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/concurrent_test_helpers.ex110:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/mabeam/test_helpers.exs100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/mabeam/test_helpers.exs103Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/mabeam/test_helpers.exs106Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/mabeam/test_helpers.exs109Process.sleep(check_interval_ms)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/concurrent_test_case.ex100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/test_workers.exs100Process.sleep(state.delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_workers.exs103Process.sleep(state.delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_workers.exs106Process.sleep(duration)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_workers.exs109Process.sleep(state.delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_workers.exs112if delay > 0, do: Process.sleep(delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_agent.ex100Process.sleep(delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/test_agent.ex103Process.sleep(delay)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
support/foundation_test_helper.exs100Process.sleep(300)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs103Process.sleep(300)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs106:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs109Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs112Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs115:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/foundation_test_helper.exs118:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/support_infrastructure_test.exs100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/support_infrastructure_test.exs103Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/support_infrastructure_test.exs106Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/support_infrastructure_test.exs109Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
support/support_infrastructure_test.exs112Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
test_helper.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
test_helper.exs103Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_test.exs100Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_test.exs101# test_pid = spawn(fn -> Process.sleep(1000) end)Commented OutRemove this commented out line.
unit/foundation/services/config_server_test.exs102# Process.sleep(50)Commented OutRemove this commented out line.
unit/foundation/services/config_server_resilient_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs103Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs106Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs109Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs112Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs115Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/services/config_server_resilient_test.exs118Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/graceful_degradation_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/graceful_degradation_test.exs103Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs100:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs103:timer.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs106:timer.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs109:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs112:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/beam/processes_test.exs115:timer.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry/backend_test.exs100{:ok, pid1} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/backend_test.exs101{:ok, pid2} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/backend_test.exs102{:ok, pid} = Task.start(fn -> Process.sleep(100) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry/backend_test.exs103Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry/backend_test.exs104{:ok, pid} = Task.start(fn -> Process.sleep(50) end)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry/backend_test.exs105Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry/unified_test_helpers_test.exs100{:ok, pid1} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/unified_test_helpers_test.exs101{:ok, pid2} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/unified_test_helpers_test.exs102{:ok, agent1_pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/unified_test_helpers_test.exs103{:ok, agent2_pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry/unified_test_helpers_test.exs104Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/rate_limiter_test.exs100Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/rate_limiter_test.exs103Process.sleep(window_ms + 100)Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
unit/foundation/infrastructure/rate_limiter_test.exs106Process.sleep(250)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/pool_workers/http_worker_test.exs100Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/connection_manager_test.exs100Process.sleep(200)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/connection_manager_test.exs103Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/connection_manager_test.exs106Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/connection_manager_test.exs109Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/circuit_breaker_test.exs100Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/circuit_breaker_test.exs103Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/infrastructure/circuit_breaker_test.exs106Process.sleep(:rand.uniform(100))Simulated WorkLow Priority: This is used to simulate work in a test agent. It’s acceptable.
unit/foundation/infrastructure/circuit_breaker_test.exs109Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/config_test.exs100:timer.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/utils_test.exs100# sleep_time = 10Commented OutRemove this commented out line.
unit/foundation/utils_test.exs101# :timer.sleep(sleep_time)Commented OutRemove this commented out line.
unit/foundation/utils_test.exs102# assert duration >= sleep_time * 1_000_000Commented OutRemove this commented out line.
unit/foundation/utils_test.exs103# Process.sleep(10)Commented OutRemove this commented out line.
unit/foundation/process_registry_metadata_test.exs100{:ok, service2_pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry_metadata_test.exs101{:ok, worker2_pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/process_registry_metadata_test.exs102{:ok, coordinator_pid} = Task.start(fn -> Process.sleep(:infinity) end)Dummy ProcessLow Priority: This is acceptable for creating a long-lived test process.
unit/foundation/service_registry_test.exs100Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/service_registry_test.exs103Process.sleep(100)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/service_registry_test.exs106Process.sleep(50)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/service_registry_test.exs109Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/error_context_test.exs100# Sleep briefly to ensure some time passesCommented OutRemove this commented out line.
unit/foundation/error_context_test.exs101Process.sleep(1)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/error_context_test.exs102Process.sleep(5)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry_test.exs100Process.sleep(10)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/process_registry_test.exs103Process.sleep(150)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.
unit/foundation/telemetry_test.exs100:timer.sleep(5)Flaky TestHigh Priority: Replace with a deterministic check. The test should wait for a specific state change or message, not a fixed time.