1919import convex .core .data .Index ;
2020import convex .core .data .Keyword ;
2121import convex .core .data .prim .CVMLong ;
22+ import convex .core .lang .RT ;
2223import convex .core .store .AStore ;
2324import convex .core .store .MemoryStore ;
2425import convex .lattice .ALattice ;
@@ -103,6 +104,7 @@ public void testPropagatorAutoStart() {
103104 * 1. The propagator detects value changes
104105 * 2. The propagator broadcasts to connected peers
105106 * 3. Broadcasts are sent automatically without manual intervention
107+ * 4. broadcast value is successfully obtained
106108 */
107109 @ Test
108110 public void testAutomaticPropagation () throws Exception {
@@ -128,7 +130,7 @@ public void testAutomaticPropagation() throws Exception {
128130 server2 .updateLocalPath (updatedDataIndex , dataKeyword );
129131
130132 // Wait for propagator to detect change and broadcast (up to 1 second)
131- TimeUnit . MILLISECONDS . sleep ( 500 );
133+ server1 . sync ( );
132134
133135 // Verify propagator detected the change and broadcasted
134136 long finalBroadcastCount = server2 .getPropagator ().getBroadcastCount ();
@@ -138,6 +140,8 @@ public void testAutomaticPropagation() throws Exception {
138140 // Verify the broadcast count increased by at least 1
139141 assertTrue ((finalBroadcastCount - initialBroadcastCount ) >= 1 ,
140142 "At least one broadcast should have been sent after value change" );
143+
144+ assertEquals (testValue ,RT .getIn (server1 .getLocalValue (),dataKeyword ,valueHash ));
141145 }
142146
143147 /**
0 commit comments