diff --git a/main/testing.txt b/main/testing.txt deleted file mode 100644 index 6636918..0000000 --- a/main/testing.txt +++ /dev/null @@ -1,1055 +0,0 @@ -[INFO] Scanning for projects... -[INFO] -[INFO] ------------------------------< sd:main >------------------------------- -[INFO] Building main 1.0-SNAPSHOT -[INFO] from pom.xml -[INFO] --------------------------------[ jar ]--------------------------------- -[WARNING] 6 problems were encountered while building the effective model for org.openjfx:javafx-controls:jar:17.0.2 during dependency collection step for project (use -X to see details) -[INFO] -[INFO] --- resources:3.3.1:resources (default-resources) @ main --- -[INFO] Copying 2 resources from src/main/resources to target/classes -[INFO] -[INFO] --- compiler:3.13.0:compile (default-compile) @ main --- -[INFO] Nothing to compile - all classes are up to date. -[INFO] -[INFO] --- resources:3.3.1:testResources (default-testResources) @ main --- -[INFO] skip non existing resourceDirectory /home/leo/uni/SD/Trabalho-Pratico-SD/main/src/test/resources -[INFO] -[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ main --- -[INFO] Nothing to compile - all classes are up to date. -[INFO] -[INFO] --- surefire:3.2.5:test (default-test) @ main --- -[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider -[INFO] -[INFO] ------------------------------------------------------- -[INFO] T E S T S -[INFO] ------------------------------------------------------- -[INFO] Running sd.coordinator.CoordinatorIntegrationTest -Mock Cr1 listening on port 9001 -Connected to Cr1 at localhost:9001 -Mock Cr1 received: VEHICLE_SPAWN -Mock Cr1 stopped -Mock Cr1 listening on port 9001 -Connected to Cr1 at localhost:9001 -Mock Cr1 stopped -Mock Cr1 listening on port 9001 -Connected to Cr1 at localhost:9001 -Mock Cr1 received: VEHICLE_SPAWN -Mock Cr1 stopped -Mock Cr1 listening on port 9001 -Mock Cr2 listening on port 9002 -Mock Cr3 listening on port 9003 -Connected to Cr1 at localhost:9001 -Connected to Cr2 at localhost:9002 -Connected to Cr3 at localhost:9003 -Mock Cr1 received: SHUTDOWN -Mock Cr2 received: SHUTDOWN -Mock Cr3 received: SHUTDOWN -Mock Cr1 stopped -Mock Cr2 stopped -Mock Cr3 stopped -[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.265 s -- in sd.coordinator.CoordinatorIntegrationTest -[INFO] Running sd.coordinator.CoordinatorProcessTest -Coordinator initialized with configuration: - - Simulation duration: 60.0s - - Arrival model: POISSON - - Arrival rate: 0.5 vehicles/s -[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 s -- in sd.coordinator.CoordinatorProcessTest -[INFO] Running sd.dashboard.DashboardTest -[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.020 s -- in sd.dashboard.DashboardTest -[INFO] Running sd.serialization.SerializationTest -JSON Vehicle: -{"id":"V001","type":"LIGHT","entryTime":10.5,"route":["Cr1","Cr2","Cr5","S"],"currentRouteIndex":0,"totalWaitingTime":0.0,"totalCrossingTime":0.0} - -JSON Message: -{"messageId":"2ee10daa-34c4-4629-9613-bfc4fbd03e46","type":"VEHICLE_TRANSFER","senderId":"Cr1","destinationId":"Cr2","payload":{"id":"V001","type":"LIGHT","entryTime":10.5,"route":["Cr1","Cr2","Cr5","S"],"currentRouteIndex":0,"totalWaitingTime":0.0,"totalCrossingTime":0.0},"timestamp":1763852220055} -[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 s -- in sd.serialization.SerializationTest -[INFO] Running sd.ExitNodeProcessTest -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... -Exit node started on port 19001 -Waiting for vehicles...\n - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... -Exit node started on port 19001 -Waiting for vehicles...\n - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... -Exit node started on port 19001 -Waiting for vehicles...\n - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... -Exit node started on port 19001 -Waiting for vehicles...\n - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -New connection accepted from 127.0.0.1 -[Exit] Connection closed from 127.0.0.1 -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... -Exit node started on port 19001 -Waiting for vehicles...\n -New connection accepted from 127.0.0.1 -[Exit] Waiting for message from 127.0.0.1 -New connection accepted from 127.0.0.1 -[Exit] Waiting for message from 127.0.0.1 -New connection accepted from 127.0.0.1 -[Exit] Waiting for message from 127.0.0.1 -[Exit] Waiting for message from 127.0.0.1 - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: [Exit] Connection closed from 127.0.0.1 -0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Connection closed from 127.0.0.1 -[Exit] Connection closed from 127.0.0.1 -[Exit] Shutdown complete. -============================================================ -Exit node initialized - - Exit port: 19001 - - Dashboard: localhost:19000 -Connecting to dashboard... - -[Exit] Shutting down... - -=== EXIT NODE STATISTICS === -Total Vehicles Completed: 0 - -VEHICLE TYPE DISTRIBUTION: -[Exit] Shutdown complete. -============================================================ -[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.273 s -- in sd.ExitNodeProcessTest -[INFO] Running sd.TrafficLightCoordinationTest -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 18.0s, Red: 30.0s) - Created traffic light: East (Green: 18.0s, Red: 30.0s) - Created traffic light: South (Green: 12.0s, Red: 36.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:9000... -[Cr2] Initialization complete. - -=== Testing Traffic Light Fairness === - -[Cr2] Server started on port 8002 - -[Cr2] Starting traffic light threads... - Started thread for: West - Started thread for: South -[Cr2-West] Traffic light thread started. - Started thread for: East -[Cr2-South] Traffic light thread started. -[Cr2-West] State: GREEN -[Cr2-East] Traffic light thread started. -[Cr2] Waiting for incoming connections... - -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN -✓ West has been GREEN - -=== Fairness Results === -West got GREEN time: ✓ YES -South got GREEN time: ✗ NO -East got GREEN time: ✗ NO - -1/3 lights were GREEN during test period - -[Cr2] Shutting down... -[Cr2-South] State: GREEN -[Cr2-East] State: GREEN -[Cr2-West] Traffic light thread interrupted. -[Cr2-South] Traffic light thread stopped. -[Cr2-East] Traffic light thread stopped. -[Cr2-West] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 18.0s, Red: 30.0s) - Created traffic light: East (Green: 18.0s, Red: 30.0s) - Created traffic light: South (Green: 12.0s, Red: 36.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:9000... -[Cr2] Initialization complete. - -=== Testing Traffic Light Mutual Exclusion === - -[Cr2] Server started on port 8002 - -[Cr2] Starting traffic light threads... - Started thread for: West - Started thread for: South -[Cr2-West] Traffic light thread started. -[Cr2-West] State: GREEN - Started thread for: East -[Cr2-South] Traffic light thread started. -[Cr2] Waiting for incoming connections... - -[Cr2-East] Traffic light thread started. - -=== Test Results === -Maximum simultaneous GREEN lights: 1 -Total violations detected: 0 - -Traffic light coordination working correctly! - -[Cr2] Shutting down... -[Cr2-West] Traffic light thread interrupted. -[Cr2-South] State: GREEN -[Cr2-West] Traffic light thread stopped. -[Cr2-East] State: GREEN -[Cr2-South] Traffic light thread stopped. -[Cr2-East] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 18.0s, Red: 30.0s) - Created traffic light: East (Green: 18.0s, Red: 30.0s) - Created traffic light: South (Green: 12.0s, Red: 36.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:9000... -[Cr2] Initialization complete. - -=== Testing State Transition Consistency === - -[Cr2] Server started on port 8002 - -[Cr2] Starting traffic light threads... - Started thread for: West - Started thread for: South -[Cr2-South] Traffic light thread started. -[Cr2-South] State: GREEN -[Cr2-West] Traffic light thread started. - Started thread for: East -[Cr2] Waiting for incoming connections... - -[Cr2-East] Traffic light thread started. -South transitioned: RED → GREEN - -Total state transitions observed: 1 - -[Cr2] Shutting down... -[Cr2-South] Traffic light thread interrupted. -[Cr2-South] Traffic light thread stopped. -[Cr2-West] State: GREEN -[Cr2-West] Traffic light thread stopped. -[Cr2-East] State: GREEN -[Cr2-East] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.14 s -- in sd.TrafficLightCoordinationTest -[INFO] Running IntersectionProcessTest -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - Started thread for: South - Started thread for: East -[Cr1-South] Traffic light thread started. -[Cr1] Waiting for incoming connections... - -[Cr1-South] State: GREEN -[Cr1-East] Traffic light thread started. - -[Cr1] Shutting down... -[Cr1] New connection accepted from 127.0.0.1 -[Cr1-South] Traffic light thread interrupted. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1-South] Traffic light thread stopped. -[Cr1] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - Started thread for: South - Started thread for: East -[Cr1-South] Traffic light thread started. -[Cr1] Waiting for incoming connections... - -[Cr1-South] State: GREEN -[Cr1-East] Traffic light thread started. - -[Cr1] Shutting down... -[Cr1-South] Traffic light thread interrupted. -[Cr1-South] Traffic light thread stopped. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:18100... -[Cr2] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - -[Cr2] Server started on port 18002 - -[Cr2] Starting traffic light threads... - Started thread for: South - Started thread for: West -[Cr1-South] Traffic light thread started. -[Cr1-South] State: GREEN - Started thread for: East -[Cr1] Waiting for incoming connections... - -[Cr1-East] Traffic light thread started. -[Cr2-West] Traffic light thread started. - Started thread for: South -[Cr2-West] State: GREEN -[Cr2-South] Traffic light thread started. - Started thread for: East -[Cr2] Waiting for incoming connections... - -[Cr2-East] Traffic light thread started. -[Cr1] New connection accepted from 127.0.0.1 -[Cr1] New connection accepted from 127.0.0.1 - -[Cr1] Shutting down... -[Cr1-South] Traffic light thread interrupted. -[Cr1-South] Traffic light thread stopped. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1] Shutdown complete. -============================================================ - - -[Cr2] Shutting down... -[Cr2-West] Traffic light thread interrupted. -[Cr2-South] State: GREEN -[Cr2-West] Traffic light thread stopped. -[Cr2-South] Traffic light thread stopped. -[Cr2-East] State: GREEN -[Cr2-East] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - Started thread for: South -[Cr1-South] Traffic light thread started. - Started thread for: East -[Cr1-South] State: GREEN -[Cr1] Waiting for incoming connections... - -[Cr1-East] Traffic light thread started. - -[Cr1] Shutting down... -[Cr1-South] Traffic light thread interrupted. -[Cr1-South] Traffic light thread stopped. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr4 -============================================================ - -[Cr4] Initializing intersection... - -[Cr4] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - -[Cr4] Configuring routing... - Route configured: To Cr5 -> Use East - Routing configured. -[Cr4] Connecting to dashboard at localhost:18100... -[Cr4] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:18100... -[Cr2] Initialization complete. - -[Cr2] Server started on port 18002 - -[Cr2] Starting traffic light threads... - Started thread for: West - Started thread for: South -[Cr2-West] Traffic light thread started. - Started thread for: East -[Cr2-West] State: GREEN -[Cr2] Waiting for incoming connections... - -[Cr2-South] Traffic light thread started. -[Cr2-East] Traffic light thread started. -[Cr2] New connection accepted from 127.0.0.1 -[Cr2] New connection accepted from 127.0.0.1 - -[Cr2] Shutting down... -[Cr2-South] State: GREEN -[Cr2-South] Traffic light thread stopped. -[Cr2-West] Traffic light thread interrupted. -[Cr2-West] Traffic light thread stopped. -[Cr2-East] State: GREEN -[Cr2-East] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr5 -============================================================ - -[Cr5] Initializing intersection... - -[Cr5] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - -[Cr5] Configuring routing... - Route configured: To S -> Use East - Routing configured. -[Cr5] Connecting to dashboard at localhost:18100... -[Cr5] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - Started thread for: South - Started thread for: East -[Cr1] Waiting for incoming connections... - -[Cr1-South] Traffic light thread started. -[Cr1-South] State: GREEN -[Cr1-East] Traffic light thread started. - -[Cr1] Shutting down... -[Cr1-South] Traffic light thread interrupted. -[Cr1-South] Traffic light thread stopped. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1] Shutdown complete. -============================================================ - -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr3 -============================================================ - -[Cr3] Initializing intersection... - -[Cr3] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr3] Configuring routing... - Route configured: To Cr2 -> Use West - Route configured: To S -> Use South - Routing configured. -[Cr3] Connecting to dashboard at localhost:18100... -[Cr3] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:18100... -[Cr2] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr3 -============================================================ - -[Cr3] Initializing intersection... - -[Cr3] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr3] Configuring routing... - Route configured: To Cr2 -> Use West - Route configured: To S -> Use South - Routing configured. -[Cr3] Connecting to dashboard at localhost:18100... -[Cr3] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr4 -============================================================ - -[Cr4] Initializing intersection... - -[Cr4] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - -[Cr4] Configuring routing... - Route configured: To Cr5 -> Use East - Routing configured. -[Cr4] Connecting to dashboard at localhost:18100... -[Cr4] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr5 -============================================================ - -[Cr5] Initializing intersection... - -[Cr5] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - -[Cr5] Configuring routing... - Route configured: To S -> Use East - Routing configured. -[Cr5] Connecting to dashboard at localhost:18100... -[Cr5] Initialization complete. -============================================================ -INTERSECTION PROCESS: Cr1 -============================================================ -============================================================ -INTERSECTION PROCESS: Cr2 -============================================================ - -[Cr1] Initializing intersection... - -[Cr1] Creating traffic lights... - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr1] Configuring routing... - Route configured: To Cr2 -> Use East - Route configured: To Cr4 -> Use South - Routing configured. -[Cr1] Connecting to dashboard at localhost:18100... -[Cr1] Initialization complete. - -[Cr2] Initializing intersection... - -[Cr2] Creating traffic lights... - Created traffic light: West (Green: 30.0s, Red: 30.0s) - Created traffic light: East (Green: 30.0s, Red: 30.0s) - Created traffic light: South (Green: 30.0s, Red: 30.0s) - -[Cr2] Configuring routing... - Route configured: To Cr1 -> Use West - Route configured: To Cr3 -> Use East - Route configured: To Cr5 -> Use South - Routing configured. -[Cr2] Connecting to dashboard at localhost:18100... -[Cr2] Initialization complete. - -[Cr1] Server started on port 18001 - -[Cr1] Starting traffic light threads... - -[Cr2] Server started on port 18002 - -[Cr2] Starting traffic light threads... - Started thread for: South - Started thread for: West -[Cr1-South] Traffic light thread started. -[Cr1-South] State: GREEN - Started thread for: East -[Cr1] Waiting for incoming connections... - -[Cr2-West] Traffic light thread started. -[Cr2-West] State: GREEN -[Cr1-East] Traffic light thread started. - Started thread for: South -[Cr2-South] Traffic light thread started. - Started thread for: East -[Cr2] Waiting for incoming connections... - -[Cr2-East] Traffic light thread started. -[Cr1] New connection accepted from 127.0.0.1 -[Cr2] New connection accepted from 127.0.0.1 - -[Cr1] Shutting down... -[Cr1-South] Traffic light thread interrupted. -[Cr1-South] Traffic light thread stopped. -[Cr1-East] State: GREEN -[Cr1-East] Traffic light thread stopped. -[Cr1] New connection accepted from 127.0.0.1 -[Cr2] New connection accepted from 127.0.0.1 -[Cr1] Shutdown complete. -============================================================ - - -[Cr2] Shutting down... -[Cr2-West] Traffic light thread interrupted. -[Cr2-West] Traffic light thread stopped. -[Cr2-South] State: GREEN -[Cr2-South] Traffic light thread stopped. -[Cr2-East] State: GREEN -[Cr2-East] Traffic light thread stopped. -[Cr2] Shutdown complete. -============================================================ - -[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.406 s -- in IntersectionProcessTest -[INFO] Running SimulationTest -[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 s -- in SimulationTest -[INFO] -[INFO] Results: -[INFO] -[INFO] Tests run: 66, Failures: 0, Errors: 0, Skipped: 0 -[INFO] -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESS -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 44.392 s -[INFO] Finished at: 2025-11-22T22:57:41Z -[INFO] ------------------------------------------------------------------------