@@ -77,26 +77,42 @@ async fn test_register_one_worker() -> Result<(), Box<dyn std::error::Error>> {
7777 // Verify get functions
7878
7979 let owner_id = get_owner_id ( & solver_registry) . await ?;
80- assert_eq ! ( owner_id, owner. id( ) . clone( ) ) ;
80+ assert_eq ! ( owner_id, owner. id( ) . clone( ) , "Incorrect owner ID" ) ;
8181
8282 let approved_compose_hashes = get_approved_compose_hashes ( & solver_registry) . await ?;
83- assert_eq ! ( approved_compose_hashes. len( ) , 1 ) ;
84- assert_eq ! ( approved_compose_hashes[ 0 ] , COMPOSE_HASH ) ;
83+ assert_eq ! (
84+ approved_compose_hashes. len( ) ,
85+ 1 ,
86+ "Incorrect number of approved compose hashes"
87+ ) ;
88+ assert_eq ! (
89+ approved_compose_hashes[ 0 ] , COMPOSE_HASH ,
90+ "Incorrect approved compose hash"
91+ ) ;
8592
8693 let pool_len = get_pool_len ( & solver_registry) . await ?;
87- assert_eq ! ( pool_len, 1 ) ;
94+ assert_eq ! ( pool_len, 1 , "Incorrect pool length" ) ;
8895
8996 let worker_len = get_worker_len ( & solver_registry) . await ?;
90- assert_eq ! ( worker_len, 1 ) ;
97+ assert_eq ! ( worker_len, 1 , "Incorrect worker length" ) ;
9198
9299 let workers = get_workers ( & solver_registry, 0 , 10 ) . await ?;
93- assert_eq ! ( workers. len( ) , 1 ) ;
94- assert_eq ! ( workers[ 0 ] . pool_id, 0 ) ;
95- assert_eq ! ( workers[ 0 ] . checksum, CHECKSUM_ALICE ) ;
96- assert_eq ! ( workers[ 0 ] . compose_hash, COMPOSE_HASH ) ;
100+ assert_eq ! ( workers. len( ) , 1 , "Incorrect number of workers" ) ;
101+ assert_eq ! ( workers[ 0 ] . pool_id, 0 , "Incorrect worker pool ID" ) ;
102+ assert_eq ! (
103+ workers[ 0 ] . checksum, CHECKSUM_ALICE ,
104+ "Incorrect worker checksum"
105+ ) ;
106+ assert_eq ! (
107+ workers[ 0 ] . compose_hash, COMPOSE_HASH ,
108+ "Incorrect worker compose hash"
109+ ) ;
97110
98111 let worker_ping_timeout_ms: u64 = get_worker_ping_timeout_ms ( & solver_registry) . await ?;
99- assert_eq ! ( worker_ping_timeout_ms, DEFAULT_WORKER_PING_TIMEOUT_MS ) ;
112+ assert_eq ! (
113+ worker_ping_timeout_ms, DEFAULT_WORKER_PING_TIMEOUT_MS ,
114+ "Incorrect worker ping timeout"
115+ ) ;
100116
101117 println ! ( "Test passed: Worker registration and pool setup completed successfully" ) ;
102118
0 commit comments