File tree Expand file tree Collapse file tree 3 files changed +36
-7
lines changed
Expand file tree Collapse file tree 3 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Windows - Smoke Tests
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ windows-tests :
9+ runs-on : windows-latest
10+ timeout-minutes : 20
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v5
14+ with :
15+ submodules : true
16+ - name : Set up Python 3.9
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.9'
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt -r test-requirements.txt
24+ - name : Run pytest (exclude e2e)
25+ run : |
26+ python -m pytest -k "not e2e" --maxfail=10 -q
Original file line number Diff line number Diff line change 3939 # kubernetes.config shim during Windows dynamic module registration.
4040 from .exec_provider import ExecProvider # type: ignore
4141except ImportError : # fallback for legacy absolute path
42- from kubernetes . config . exec_provider import ExecProvider # noqa: F401
42+ from . exec_provider import ExecProvider # type: ignore
4343
4444from .config_exception import ConfigException
4545from .dateutil import UTC , format_rfc3339 , parse_rfc3339
Original file line number Diff line number Diff line change 1- ## Leader Election Example
1+ # Leader Election Example
2+
23This example demonstrates how to use the leader election library.
34
45## Running
5- Run the following command in multiple separate terminals preferably an odd number.
6+
7+ Run the following command in multiple separate terminals preferably an odd number.
68Each running process uses a unique identifier displayed when it starts to run.
79
8- - When a program runs, if a lock object already exists with the specified name,
9- all candidates will start as followers.
10- - If a lock object does not exist with the specified name then whichever candidate
10+ - When a program runs, if a lock object already exists with the specified name,
11+ all candidates will start as followers.
12+ - If a lock object does not exist with the specified name then whichever candidate
1113creates a lock object first will become the leader and the rest will be followers.
12- - The user will be prompted about the status of the candidates and transitions.
14+ - The user will be prompted about the status of the candidates and transitions.
1315
1416### Command to run
17+
1518``` python example.py ```
1619
1720Now kill the existing leader. You will see from the terminal outputs that one of the
You can’t perform that action at this time.
0 commit comments