File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,11 @@ async def test_subscribe_after_first_update(http_client):
9999
100100@pytest .mark .asyncio
101101async def test_subscribe_after_first_update_from_beginning (http_client ):
102- """Client that subscribes after first update but requests from seq_num=1 sees all updates."""
102+ """Client that subscribes after first update but requests from seq_num=0 sees all updates.
103+
104+ Note: seq_num starts at 1 for the first data point. seq_num=0 means "start as far back
105+ as you have" (similar to Bluesky social)
106+ """
103107 # Create node
104108 response = await http_client .post ("/upload" )
105109 assert response .status_code == 200
@@ -117,7 +121,7 @@ async def test_subscribe_after_first_update_from_beginning(http_client):
117121 await asyncio .sleep (0.1 )
118122
119123 # Connect WebSocket requesting from beginning
120- async with aconnect_ws (f"/stream/single/{ node_id } ?seq_num=1 " , http_client ) as ws :
124+ async with aconnect_ws (f"/stream/single/{ node_id } ?seq_num=0 " , http_client ) as ws :
121125 # First, should receive the historical update
122126 historical_msg = json .loads (
123127 await asyncio .wait_for (ws .receive_text (), timeout = 2.0 )
You can’t perform that action at this time.
0 commit comments