pytest-neon 2.1.1__py3-none-any.whl → 2.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pytest_neon/__init__.py CHANGED
@@ -9,7 +9,7 @@ from pytest_neon.plugin import (
9
9
  neon_engine,
10
10
  )
11
11
 
12
- __version__ = "2.1.1"
12
+ __version__ = "2.1.3"
13
13
  __all__ = [
14
14
  "NeonBranch",
15
15
  "neon_branch",
pytest_neon/plugin.py CHANGED
@@ -480,9 +480,17 @@ def _wait_for_operations(
480
480
  return # All operations already complete
481
481
 
482
482
  waited = 0.0
483
+ first_poll = True
483
484
  while pending_op_ids and waited < max_wait_seconds:
484
- time.sleep(poll_interval)
485
- waited += poll_interval
485
+ # Poll immediately first time (operation usually completes instantly),
486
+ # then wait between subsequent polls
487
+ if first_poll:
488
+ time.sleep(0.1) # Tiny delay to let operation start
489
+ waited += 0.1
490
+ first_poll = False
491
+ else:
492
+ time.sleep(poll_interval)
493
+ waited += poll_interval
486
494
 
487
495
  # Check status of each pending operation
488
496
  still_pending = []
@@ -494,10 +502,10 @@ def _wait_for_operations(
494
502
  op_data = response.json().get("operation", {})
495
503
  status = op_data.get("status")
496
504
 
497
- if status == "error":
505
+ if status == "failed":
498
506
  err = op_data.get("error", "unknown error")
499
507
  raise RuntimeError(f"Operation {op_id} failed: {err}")
500
- if status not in ("finished", "skipped"):
508
+ if status not in ("finished", "skipped", "cancelled"):
501
509
  still_pending.append(op_id)
502
510
  except requests.RequestException:
503
511
  # On network error, assume still pending and retry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-neon
3
- Version: 2.1.1
3
+ Version: 2.1.3
4
4
  Summary: Pytest plugin for Neon database branch isolation in tests
5
5
  Project-URL: Homepage, https://github.com/ZainRizvi/pytest-neon
6
6
  Project-URL: Repository, https://github.com/ZainRizvi/pytest-neon
@@ -0,0 +1,8 @@
1
+ pytest_neon/__init__.py,sha256=fH3sniGAu5gQb9BBLFBdihY6hF1oVo7m44TADgL6HfE,398
2
+ pytest_neon/plugin.py,sha256=tD6d9OfkWxd1tpv4_v5HSuUSJaveF7cFHX_gtsXbC6s,38052
3
+ pytest_neon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ pytest_neon-2.1.3.dist-info/METADATA,sha256=0S8dlHOXbfkw83RabqlH0I5D7kUH5Qu1VzcUCmb-ga0,18734
5
+ pytest_neon-2.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ pytest_neon-2.1.3.dist-info/entry_points.txt,sha256=5U88Idj_G8-PSDb9VF3OwYFbGLHnGOo_GxgYvi0dtXw,37
7
+ pytest_neon-2.1.3.dist-info/licenses/LICENSE,sha256=aKKp_Ex4WBHTByY4BhXJ181dzB_qYhi2pCUmZ7Spn_0,1067
8
+ pytest_neon-2.1.3.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- pytest_neon/__init__.py,sha256=fHGWjiPNW359dinHRv4ldELBxmxb9mOPG1DqzL2QFuA,398
2
- pytest_neon/plugin.py,sha256=BewDydvL_16zT38TsmLJJhvkyLAHtmFIsDfOzae-vQ4,37725
3
- pytest_neon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- pytest_neon-2.1.1.dist-info/METADATA,sha256=PO8HOrmTLpyBHAlMK-0akpzpm9pN2msWePZ8Nkf5bUI,18734
5
- pytest_neon-2.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
- pytest_neon-2.1.1.dist-info/entry_points.txt,sha256=5U88Idj_G8-PSDb9VF3OwYFbGLHnGOo_GxgYvi0dtXw,37
7
- pytest_neon-2.1.1.dist-info/licenses/LICENSE,sha256=aKKp_Ex4WBHTByY4BhXJ181dzB_qYhi2pCUmZ7Spn_0,1067
8
- pytest_neon-2.1.1.dist-info/RECORD,,