1010
1111pytestmark = [pytest .mark .smoketest , pytest .mark .asyncio ]
1212
13- THIRTY_SECOND_TIMEOUT = 30
1413TWO_MINUTE_TIMEOUT = 120
14+ FOUR_MINUTE_TIMEOUT = 240
1515
1616
1717class TestAsyncSnapshotLifecycle :
1818 """Test basic async snapshot lifecycle operations."""
1919
20- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
20+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
2121 async def test_snapshot_create_and_info (self , async_sdk_client : AsyncRunloopSDK ) -> None :
2222 """Test creating a snapshot from devbox."""
2323 # Create a devbox
@@ -51,7 +51,7 @@ async def test_snapshot_create_and_info(self, async_sdk_client: AsyncRunloopSDK)
5151 finally :
5252 await devbox .shutdown ()
5353
54- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
54+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
5555 async def test_snapshot_with_commit_message (self , async_sdk_client : AsyncRunloopSDK ) -> None :
5656 """Test creating a snapshot with commit message."""
5757 devbox = await async_sdk_client .devbox .create (
@@ -78,7 +78,7 @@ async def test_snapshot_with_commit_message(self, async_sdk_client: AsyncRunloop
7878 finally :
7979 await devbox .shutdown ()
8080
81- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
81+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
8282 async def test_snapshot_with_metadata (self , async_sdk_client : AsyncRunloopSDK ) -> None :
8383 """Test creating a snapshot with metadata."""
8484 devbox = await async_sdk_client .devbox .create (
@@ -107,7 +107,7 @@ async def test_snapshot_with_metadata(self, async_sdk_client: AsyncRunloopSDK) -
107107 finally :
108108 await devbox .shutdown ()
109109
110- @pytest .mark .timeout (THIRTY_SECOND_TIMEOUT )
110+ @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
111111 async def test_snapshot_delete (self , async_sdk_client : AsyncRunloopSDK ) -> None :
112112 """Test deleting a snapshot."""
113113 devbox = await async_sdk_client .devbox .create (
@@ -138,7 +138,7 @@ async def test_snapshot_delete(self, async_sdk_client: AsyncRunloopSDK) -> None:
138138class TestAsyncSnapshotCompletion :
139139 """Test async snapshot completion and status tracking."""
140140
141- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
141+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
142142 async def test_snapshot_await_completed (self , async_sdk_client : AsyncRunloopSDK ) -> None :
143143 """Test waiting for snapshot completion."""
144144 devbox = await async_sdk_client .devbox .create (
@@ -165,7 +165,7 @@ async def test_snapshot_await_completed(self, async_sdk_client: AsyncRunloopSDK)
165165 finally :
166166 await devbox .shutdown ()
167167
168- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
168+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
169169 async def test_snapshot_status_tracking (self , async_sdk_client : AsyncRunloopSDK ) -> None :
170170 """Test tracking snapshot status through lifecycle."""
171171 devbox = await async_sdk_client .devbox .create (
@@ -199,7 +199,7 @@ async def test_snapshot_status_tracking(self, async_sdk_client: AsyncRunloopSDK)
199199class TestAsyncSnapshotDevboxRestoration :
200200 """Test creating devboxes from snapshots asynchronously."""
201201
202- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT * 2 )
202+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
203203 async def test_restore_devbox_from_snapshot (self , async_sdk_client : AsyncRunloopSDK ) -> None :
204204 """Test creating a devbox from a snapshot and verifying state is restored."""
205205 # Create source devbox
@@ -242,7 +242,7 @@ async def test_restore_devbox_from_snapshot(self, async_sdk_client: AsyncRunloop
242242 finally :
243243 await source_devbox .shutdown ()
244244
245- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT * 2 )
245+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
246246 async def test_multiple_devboxes_from_snapshot (self , async_sdk_client : AsyncRunloopSDK ) -> None :
247247 """Test creating multiple devboxes from the same snapshot."""
248248 # Create source devbox
@@ -300,7 +300,7 @@ async def test_multiple_devboxes_from_snapshot(self, async_sdk_client: AsyncRunl
300300class TestAsyncSnapshotListing :
301301 """Test async snapshot listing and retrieval operations."""
302302
303- @pytest .mark .timeout (THIRTY_SECOND_TIMEOUT )
303+ @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
304304 async def test_list_snapshots (self , async_sdk_client : AsyncRunloopSDK ) -> None :
305305 """Test listing snapshots."""
306306 snapshots = await async_sdk_client .snapshot .list (limit = 10 )
@@ -309,7 +309,7 @@ async def test_list_snapshots(self, async_sdk_client: AsyncRunloopSDK) -> None:
309309 # List might be empty, that's okay
310310 assert len (snapshots ) >= 0
311311
312- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
312+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
313313 async def test_get_snapshot_by_id (self , async_sdk_client : AsyncRunloopSDK ) -> None :
314314 """Test retrieving snapshot by ID."""
315315 # Create a devbox and snapshot
@@ -336,7 +336,7 @@ async def test_get_snapshot_by_id(self, async_sdk_client: AsyncRunloopSDK) -> No
336336 finally :
337337 await devbox .shutdown ()
338338
339- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
339+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
340340 async def test_list_snapshots_by_devbox (self , async_sdk_client : AsyncRunloopSDK ) -> None :
341341 """Test listing snapshots filtered by devbox."""
342342 # Create a devbox
@@ -370,7 +370,7 @@ async def test_list_snapshots_by_devbox(self, async_sdk_client: AsyncRunloopSDK)
370370class TestAsyncSnapshotEdgeCases :
371371 """Test async snapshot edge cases and special scenarios."""
372372
373- @pytest .mark .timeout (TWO_MINUTE_TIMEOUT * 2 )
373+ @pytest .mark .timeout (FOUR_MINUTE_TIMEOUT )
374374 async def test_snapshot_preserves_file_permissions (self , async_sdk_client : AsyncRunloopSDK ) -> None :
375375 """Test that snapshot preserves file permissions."""
376376 # Create devbox
0 commit comments