Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run more limited test configurations #6717

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 64 additions & 66 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ env:
PR_BASE_COMMIT: ${{ github.event.pull_request.base.sha }}
DOCKER_COMPOSE_FILE: ./develop/github/docker-compose.yml
TEMPORAL_VERSION_CHECK_DISABLED: 1
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }}

jobs:
set-up-single-test:
Expand All @@ -82,7 +81,7 @@ jobs:
steps:
- id: generate_output
run: |
shards=3
shards=8
timeout=20 # update this to TEST_TIMEOUT if you update the Makefile
runs_on='["ubuntu-20.04"]'
if [[ "${{ inputs.run_single_functional_test }}" == "true" || "${{ inputs.run_single_unit_test }}" == "true" ]]; then
Expand Down Expand Up @@ -230,8 +229,6 @@ jobs:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
BUILDKITE_MESSAGE: '{"job": "unit-test"}'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -293,8 +290,6 @@ jobs:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
BUILDKITE_MESSAGE: '{"job": "integration-test"}'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -366,50 +361,48 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: ${{ fromJson(needs.set-up-single-test.outputs.runs_on) }}
shard_index: ${{ fromJson(needs.set-up-single-test.outputs.shard_indices) }}
name:
- cass_es
- cass_es8
- sqlite
- mysql8
- postgres12
- postgres12_pgx
name: [cass_es, sqlite]
include:
# These two get all tests:
- name: cass_es
persistence_type: nosql
persistence_driver: cassandra
containers: [cassandra, elasticsearch]
es_version: v7
- name: sqlite
persistence_type: sql
persistence_driver: sqlite
containers: []
# The rest get smoke tests only:
- name: cass_es8
persistence_type: nosql
persistence_driver: cassandra
containers: [cassandra, elasticsearch8]
es_version: v8
- name: sqlite
persistence_type: sql
persistence_driver: sqlite
containers: []
shard_index: smoke_only
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
containers: [mysql]
shard_index: smoke_only
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
containers: [postgresql]
shard_index: smoke_only
- name: postgres12_pgx
persistence_type: sql
persistence_driver: postgres12_pgx
containers: [postgresql]
runs-on: ${{ matrix.runs-on }}
shard_index: smoke_only
runs-on: ${{ fromJson(needs.set-up-single-test.outputs.runs_on) }}
env:
TEST_TOTAL_SHARDS: ${{ needs.set-up-single-test.outputs.total_shards }}
TEST_SHARD_INDEX: ${{ matrix.shard_index }}
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }}
TEST_TIMEOUT: ${{ needs.set-up-single-test.outputs.test_timeout }}
BUILDKITE_MESSAGE: '{"job": "functional-test", "db": "${{ matrix.persistence_driver }}"}'
steps:
- uses: ScribeMD/[email protected]
if: ${{ inputs.run_single_functional_test != true || (inputs.run_single_functional_test == true && contains(fromJSON(needs.set-up-single-test.outputs.dbs), env.PERSISTENCE_DRIVER)) }}
Expand Down Expand Up @@ -460,7 +453,7 @@ jobs:
uses: actions/[email protected]
if: ${{ !cancelled() && !inputs.run_single_functional_test }}
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.runs-on}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test
path: .testoutput
include-hidden-files: true
retention-days: 28
Expand All @@ -484,39 +477,44 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [cass_es, cass_es8, mysql8, postgres12, postgres12_pgx]
name: [cass_es, sqlite]
# TODO: remote this: name: [cass_es, cass_es8, mysql8, postgres12, postgres12_pgx]
include:
- name: cass_es
persistence_type: nosql
persistence_driver: elasticsearch
parallel_flags: ""
containers: [cassandra, elasticsearch]
- name: cass_es8
persistence_type: nosql
persistence_driver: elasticsearch
parallel_flags: ""
containers: [cassandra, elasticsearch8]
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
parallel_flags: ""
containers: [mysql]
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
parallel_flags: "-parallel=2" # reduce parallelism for postgres
containers: [postgresql]
- name: postgres12_pgx
# parallel_flags: ""
- name: sqlite
persistence_type: sql
persistence_driver: postgres12_pgx
parallel_flags: "-parallel=2" # reduce parallelism for postgres
containers: [postgresql]
persistence_driver: sqlite
containers: []
# parallel_flags: ""
# - name: cass_es8
# persistence_type: nosql
# persistence_driver: elasticsearch
# parallel_flags: ""
# containers: [cassandra, elasticsearch8]
# - name: mysql8
# persistence_type: sql
# persistence_driver: mysql8
# parallel_flags: ""
# containers: [mysql]
# - name: postgres12
# persistence_type: sql
# persistence_driver: postgres12
# parallel_flags: "-parallel=2" # reduce parallelism for postgres
# containers: [postgresql]
# - name: postgres12_pgx
# persistence_type: sql
# persistence_driver: postgres12_pgx
# parallel_flags: "-parallel=2" # reduce parallelism for postgres
# containers: [postgresql]
runs-on: ubuntu-20.04
env:
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }}
BUILDKITE_MESSAGE: '{"job": "functional-test-xdc", "db": "${{ matrix.persistence_driver }}"}'
TEST_PARALLEL_FLAGS: ${{ matrix.parallel_flags }}
# TEST_PARALLEL_FLAGS: ${{ matrix.parallel_flags }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -581,35 +579,35 @@ jobs:
strategy:
fail-fast: false
matrix:
name:
- cass_es
- cass_es8
- mysql8
- postgres12
- postgres12_pgx
name: [cass_es, sqlite]
# TODO: remove this: name: [cass_es, cass_es8, mysql8, postgres12, postgres12_pgx]
include:
- name: cass_es
persistence_type: nosql
persistence_driver: elasticsearch
containers: [cassandra, elasticsearch]
es_version: v7
- name: cass_es8
persistence_type: nosql
persistence_driver: elasticsearch
containers: [cassandra, elasticsearch8]
es_version: v8
- name: mysql8
persistence_type: sql
persistence_driver: mysql8
containers: [mysql]
- name: postgres12
persistence_type: sql
persistence_driver: postgres12
containers: [postgresql]
- name: postgres12_pgx
- name: sqlite
persistence_type: sql
persistence_driver: postgres12_pgx
containers: [postgresql]
persistence_driver: sqlite
containers: []
# - name: cass_es8
# persistence_type: nosql
# persistence_driver: elasticsearch
# containers: [cassandra, elasticsearch8]
# es_version: v8
# - name: mysql8
# persistence_type: sql
# persistence_driver: mysql8
# containers: [mysql]
# - name: postgres12
# persistence_type: sql
# persistence_driver: postgres12
# containers: [postgresql]
# - name: postgres12_pgx
# persistence_type: sql
# persistence_driver: postgres12_pgx
# containers: [postgresql]
runs-on: ubuntu-20.04
env:
PERSISTENCE_TYPE: ${{ matrix.persistence_type }}
Expand Down
1 change: 1 addition & 0 deletions tests/links_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type LinksSuite struct {
}

func TestLinksTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(LinksSuite))
}

Expand Down
3 changes: 3 additions & 0 deletions tests/namespace_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func TestNamespaceSuite(t *testing.T) {
}

func (s *namespaceTestSuite) SetupSuite() {
// This suite doesn't embed FunctionalTestBase so we have to call CheckTestShard manually.
testcore.CheckTestShard(s.T())

s.logger = log.NewTestLogger()
s.testClusterFactory = testcore.NewTestClusterFactory()

Expand Down
46 changes: 0 additions & 46 deletions tests/testcore/client.go

This file was deleted.

Loading
Loading