diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ea0ee8..f122b10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,14 +25,15 @@ jobs: options: - ["Other", "--ignore=tests/test_replica_set.py --ignore=tests/test_replica_sets.py --ignore=tests/test_sharded_clusters.py", "3.9"] - ["Replica Set", "tests/test_replica_set.py", "3.10"] - - ["Replica Sets", "tests/test_replica_sets.py", "3.11"] - - ["Sharded", "tests/test_sharded_clusters.py", "3.13"] + - ["Replica Sets", "tests/test_replica_sets.py", "3.12"] + - ["Sharded", "tests/test_sharded_clusters.py", "3.14"] steps: - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: ${{ matrix.options[2] }} + allow-prereleases: true - name: Install MongoDB run: | wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - diff --git a/pyproject.toml b/pyproject.toml index 350733e..d2f14c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dependencies = [ "bottle>=0.12.7", diff --git a/tests/test_launch.py b/tests/test_launch.py index d8a0c06..95354a9 100644 --- a/tests/test_launch.py +++ b/tests/test_launch.py @@ -17,6 +17,8 @@ import shlex import pexpect import subprocess +import signal +from pathlib import Path import unittest def run(cmd, **kwargs): @@ -25,6 +27,11 @@ def run(cmd, **kwargs): raise RuntimeError('Process failed!') +def stop(): + pid = Path("server.pid").read_text().strip() + os.kill(int(pid), signal.SIGTERM) + Path("server.pid").unlink() + class TestLaunch(unittest.TestCase): def test_launch_single(self): @@ -36,7 +43,9 @@ def test_launch_single(self): proc.send('q\n') proc.wait() self.assertEqual(proc.exitstatus, 0) - run('mongo-orchestration stop') + # TODO: https://jira.mongodb.org/browse/PYTHON-5594 + # run('mongo-orchestration stop') + stop() def test_launch_replica_set(self): if os.name != 'posix': @@ -47,7 +56,10 @@ def test_launch_replica_set(self): proc.send('q\n') proc.wait() self.assertEqual(proc.exitstatus, 0) - run('mongo-orchestration stop') + # TODO: https://jira.mongodb.org/browse/PYTHON-5594 + # run('mongo-orchestration stop') + stop() + def test_launch_sharded(self): if os.name != 'posix': @@ -58,4 +70,6 @@ def test_launch_sharded(self): proc.send('q\n') proc.wait() self.assertEqual(proc.exitstatus, 0) - run('mongo-orchestration stop') \ No newline at end of file + # TODO: https://jira.mongodb.org/browse/PYTHON-5594 + # run('mongo-orchestration stop') + stop()