Skip to content

Commit d62842f

Browse files
committed
ignore: Battling test flakiness
1 parent c22ad26 commit d62842f

File tree

3 files changed

+98
-96
lines changed

3 files changed

+98
-96
lines changed

.github/workflows/ci.yml

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
21-
22-
services:
23-
redis:
24-
image: redis
25-
ports:
26-
- 6379:6379
27-
dynamodb:
28-
image: amazon/dynamodb-local
29-
ports:
30-
- 8000:8000
31-
consul:
32-
image: hashicorp/consul
33-
ports:
34-
- 8500:8500
20+
python-version: ["3.9"]
21+
22+
# services:
23+
# redis:
24+
# image: redis
25+
# ports:
26+
# - 6379:6379
27+
# dynamodb:
28+
# image: amazon/dynamodb-local
29+
# ports:
30+
# - 8000:8000
31+
# consul:
32+
# image: hashicorp/consul
33+
# ports:
34+
# - 8500:8500
3535

3636
steps:
3737
- uses: actions/checkout@v4
@@ -43,85 +43,85 @@ jobs:
4343
- name: Install poetry
4444
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
4545

46-
- uses: ./.github/actions/build
47-
- uses: ./.github/actions/build-docs
48-
49-
- name: Run tests
50-
run: make test-all
51-
52-
- name: Verify typehints
53-
run: make lint
54-
55-
#
56-
# SDK contract tests
57-
#
58-
59-
- name: install contract test dependencies
60-
run: make install-contract-tests-deps
61-
62-
- name: start contract test service
63-
run: make start-contract-test-service-bg
64-
65-
- uses: launchdarkly/gh-actions/actions/[email protected]
66-
with:
67-
test_service_port: 9000
68-
token: ${{ secrets.GITHUB_TOKEN }}
69-
70-
windows:
71-
runs-on: windows-latest
72-
73-
defaults:
74-
run:
75-
shell: powershell
76-
77-
strategy:
78-
fail-fast: false
79-
matrix:
80-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
81-
82-
steps:
83-
- uses: actions/checkout@v4
84-
- name: Set up Python ${{ matrix.python-version }}
85-
uses: actions/setup-python@v5
86-
with:
87-
python-version: ${{ matrix.python-version }}
88-
89-
- name: Setup DynamoDB
90-
run: |
91-
$ProgressPreference = "SilentlyContinue"
92-
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
93-
mkdir dynamo
94-
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
95-
cd dynamo
96-
cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
97-
98-
- name: Setup Consul
99-
run: |
100-
$ProgressPreference = "SilentlyContinue"
101-
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
102-
mkdir consul
103-
Expand-Archive -Path consul.zip -DestinationPath consul
104-
cd consul
105-
sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
106-
sc.exe start "Consul"
107-
108-
- name: Setup Redis
109-
run: |
110-
$ProgressPreference = "SilentlyContinue"
111-
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
112-
mkdir redis
113-
Expand-Archive -Path redis.zip -DestinationPath redis
114-
cd redis
115-
./redis-server --service-install
116-
./redis-server --service-start
117-
Start-Sleep -s 5
118-
./redis-cli ping
119-
120-
- name: Install poetry
121-
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
122-
123-
- name: Install requirements
124-
run: poetry install --all-extras
46+
# - uses: ./.github/actions/build
47+
# - uses: ./.github/actions/build-docs
12548

12649
- name: Run tests
127-
run: make test-all
50+
run: make test
51+
52+
# - name: Verify typehints
53+
# run: make lint
54+
#
55+
# #
56+
# # SDK contract tests
57+
# #
58+
#
59+
# - name: install contract test dependencies
60+
# run: make install-contract-tests-deps
61+
#
62+
# - name: start contract test service
63+
# run: make start-contract-test-service-bg
64+
#
65+
# - uses: launchdarkly/gh-actions/actions/[email protected]
66+
# with:
67+
# test_service_port: 9000
68+
# token: ${{ secrets.GITHUB_TOKEN }}
69+
70+
# windows:
71+
# runs-on: windows-latest
72+
#
73+
# defaults:
74+
# run:
75+
# shell: powershell
76+
#
77+
# strategy:
78+
# fail-fast: false
79+
# matrix:
80+
# python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
81+
#
82+
# steps:
83+
# - uses: actions/checkout@v4
84+
# - name: Set up Python ${{ matrix.python-version }}
85+
# uses: actions/setup-python@v5
86+
# with:
87+
# python-version: ${{ matrix.python-version }}
88+
#
89+
# - name: Setup DynamoDB
90+
# run: |
91+
# $ProgressPreference = "SilentlyContinue"
92+
# iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
93+
# mkdir dynamo
94+
# Expand-Archive -Path dynamo.zip -DestinationPath dynamo
95+
# cd dynamo
96+
# cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
97+
#
98+
# - name: Setup Consul
99+
# run: |
100+
# $ProgressPreference = "SilentlyContinue"
101+
# iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
102+
# mkdir consul
103+
# Expand-Archive -Path consul.zip -DestinationPath consul
104+
# cd consul
105+
# sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
106+
# sc.exe start "Consul"
107+
#
108+
# - name: Setup Redis
109+
# run: |
110+
# $ProgressPreference = "SilentlyContinue"
111+
# iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
112+
# mkdir redis
113+
# Expand-Archive -Path redis.zip -DestinationPath redis
114+
# cd redis
115+
# ./redis-server --service-install
116+
# ./redis-server --service-start
117+
# Start-Sleep -s 5
118+
# ./redis-cli ping
119+
#
120+
# - name: Install poetry
121+
# uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
122+
#
123+
# - name: Install requirements
124+
# run: poetry install --all-extras
125+
#
126+
# - name: Run tests
127+
# run: make test-all

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ install:
2828
.PHONY: test
2929
test: #! Run unit tests
3030
test: install
31-
@LD_SKIP_DATABASE_TESTS=1 poetry run pytest $(PYTEST_FLAGS)
31+
@LD_SKIP_DATABASE_TESTS=1 poetry run pytest $(PYTEST_FLAGS) ldclient/testing/test_file_data_source.py
3232

3333
.PHONY: test-all
3434
test-all: #! Run unit tests (including database integrations)

ldclient/testing/test_file_data_source.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ def make_temp_file(content):
127127
def replace_file(path, content):
128128
with open(path, 'w') as f:
129129
f.write(content)
130+
f.flush()
131+
os.fsync(f.fileno())
130132

131133

132134
def test_does_not_load_data_prior_to_start():

0 commit comments

Comments
 (0)