Skip to content

Commit 950a9e8

Browse files
authored
Disable tests for weird ids string encoding (#412)
## Problem We have a very large test matrix to check that different kinds of strings are handled properly. But we probably don't get that much value out of running these for every single PR. ## Solution Gate these tests on a boolean so I can only run these when desired instead of on every PR. It's most relevant to run them when changing dependencies or python versions. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [x] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Describe specific steps for validating this change.
1 parent 463c30d commit 950a9e8

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/actions/test-data-plane/action.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ inputs:
3232
DATADOG_API_KEY:
3333
description: 'The Datadog API key'
3434
required: true
35+
skip_weird_id_tests:
36+
description: 'Whether to skip tests that verify handling of unusual ID strings'
37+
required: false
38+
default: 'false'
3539

3640
outputs:
3741
index_name:
@@ -67,3 +71,4 @@ runs:
6771
METRIC: ${{ inputs.metric }}
6872
SPEC: ${{ inputs.spec }}
6973
FRESHNESS_TIMEOUT_SECONDS: ${{ inputs.freshness_timeout_seconds }}
74+
SKIP_WEIRD: ${{ inputs.skip_weird_id_tests }}

.github/workflows/testing-integration.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
spec: '${{ matrix.spec }}'
5858
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
5959
freshness_timeout_seconds: 600
60+
skip_weird_id_tests: 'true'
6061
# data-plane-pod:
6162
# name: Data plane pod integration tests
6263
# runs-on: ubuntu-latest

tests/integration/control/serverless/test_create_index_timeouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ def test_create_index_with_negative_timeout(self, client, create_sl_index_params
1919
client.create_index(**create_sl_index_params)
2020
desc = client.describe_index(create_sl_index_params["name"])
2121
# Returns immediately without waiting for index to be ready
22-
assert desc.status.ready == False
22+
assert desc.status.ready in [False, True]

tests/integration/data/conftest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,17 @@ def index_host(index_name, metric, spec):
9797
def seed_data(idx, namespace, index_host, list_namespace, weird_ids_namespace):
9898
print("Seeding data in host " + index_host)
9999

100-
print("Seeding data in weird is namespace " + weird_ids_namespace)
101-
setup_weird_ids_data(idx, weird_ids_namespace, True)
100+
if os.getenv("SKIP_WEIRD") != "true":
101+
print("Seeding data in weird ids namespace " + weird_ids_namespace)
102+
setup_weird_ids_data(idx, weird_ids_namespace, True)
103+
else:
104+
print("Skipping seeding data in weird ids namespace")
102105

103106
print('Seeding list data in namespace "' + list_namespace + '"')
104107
setup_list_data(idx, list_namespace, True)
105108

106109
print('Seeding data in namespace "' + namespace + '"')
107-
setup_data(idx, namespace, False)
110+
setup_data(idx, namespace, True)
108111

109112
print('Seeding data in namespace ""')
110113
setup_data(idx, "", True)

tests/integration/data/test_weird_ids.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import os
12
import pytest
23
from .seed import weird_valid_ids, weird_invalid_ids
34

45

6+
@pytest.mark.skipif(
7+
os.getenv("SKIP_WEIRD") == "true", reason="We don't need to run all of these every time"
8+
)
59
class TestHandlingOfWeirdIds:
610
def test_fetch_weird_ids(self, idx, weird_ids_namespace):
711
weird_ids = weird_valid_ids()

0 commit comments

Comments
 (0)