mirror of https://github.com/status-im/consul.git
Skip tests with p95 greater than 30 seconds outside of main and release branches. (#19628)
Skip tests with p95 greater than 30 seconds.
This commit is contained in:
parent
5e5701e032
commit
2591318c82
|
@ -229,7 +229,7 @@ jobs:
|
||||||
# uploaded-binary-name: 'consul-bin-arm64'
|
# uploaded-binary-name: 'consul-bin-arm64'
|
||||||
# runner-count: 12
|
# runner-count: 12
|
||||||
# runs-on: "['self-hosted', 'ondemand', 'os=macos-arm', 'arm64']"
|
# runs-on: "['self-hosted', 'ondemand', 'os=macos-arm', 'arm64']"
|
||||||
# go-test-flags: 'if ! [[ "$GITHUB_REF_NAME" =~ ^main$|^release/ ]]; then export GO_TEST_FLAGS="-short"; fi'
|
# go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
|
||||||
# repository-name: ${{ github.repository }}
|
# repository-name: ${{ github.repository }}
|
||||||
# secrets:
|
# secrets:
|
||||||
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
@ -243,10 +243,11 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit-split.yml
|
uses: ./.github/workflows/reusable-unit-split.yml
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
runner-count: 12
|
runner-count: 6
|
||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: ""
|
go-tags: ""
|
||||||
|
go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -263,10 +264,11 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit-split.yml
|
uses: ./.github/workflows/reusable-unit-split.yml
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
runner-count: 12
|
runner-count: 6
|
||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
||||||
|
go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -282,7 +284,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
go-test-flags: 'GO_TEST_FLAGS="-race -gcflags=all=-d=checkptr=0"'
|
go-test-flags: "-race -gcflags=all=-d=checkptr=0"
|
||||||
package-names-command: "go list ./... | grep -E -v '^github.com/hashicorp/consul/agent(/consul|/local|/routine-leak-checker)?$' | grep -E -v '^github.com/hashicorp/consul(/command|/connect|/snapshot)'"
|
package-names-command: "go list ./... | grep -E -v '^github.com/hashicorp/consul/agent(/consul|/local|/routine-leak-checker)?$' | grep -E -v '^github.com/hashicorp/consul(/command|/connect|/snapshot)'"
|
||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
|
@ -303,7 +305,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
go-arch: "386"
|
go-arch: "386"
|
||||||
go-test-flags: 'export GO_TEST_FLAGS="-short"'
|
go-test-flags: "-short"
|
||||||
runs-on: ${{ needs.setup.outputs.compute-large }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
||||||
|
@ -324,7 +326,7 @@ jobs:
|
||||||
# with:
|
# with:
|
||||||
# uploaded-binary-name: 'consul-bin-s390x'
|
# uploaded-binary-name: 'consul-bin-s390x'
|
||||||
# directory: .
|
# directory: .
|
||||||
# go-test-flags: 'export GO_TEST_FLAGS="-short"'
|
# go-test-flags: -short"
|
||||||
# runs-on: ${{ needs.setup.outputs.compute-large }}
|
# runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
# repository-name: ${{ github.repository }}
|
# repository-name: ${{ github.repository }}
|
||||||
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
|
||||||
|
|
|
@ -115,8 +115,6 @@ jobs:
|
||||||
PACKAGE_NAMES="${{ join(matrix.package, ' ') }}"
|
PACKAGE_NAMES="${{ join(matrix.package, ' ') }}"
|
||||||
# PACKAGE_NAMES="${{ matrix.package }}"
|
# PACKAGE_NAMES="${{ matrix.package }}"
|
||||||
|
|
||||||
${{inputs.go-test-flags}}
|
|
||||||
|
|
||||||
# some tests expect this umask, and arm images have a different default
|
# some tests expect this umask, and arm images have a different default
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
|
@ -130,6 +128,7 @@ jobs:
|
||||||
--packages="$PACKAGE_NAMES" \
|
--packages="$PACKAGE_NAMES" \
|
||||||
--junitfile ${{env.TEST_RESULTS}}/gotestsum-report.xml -- \
|
--junitfile ${{env.TEST_RESULTS}}/gotestsum-report.xml -- \
|
||||||
-tags="${{env.GOTAGS}}" \
|
-tags="${{env.GOTAGS}}" \
|
||||||
|
${{inputs.go-test-flags}} \
|
||||||
-cover -coverprofile=coverage.txt \
|
-cover -coverprofile=coverage.txt \
|
||||||
-timeout=30m
|
-timeout=30m
|
||||||
|
|
||||||
|
|
|
@ -96,8 +96,6 @@ jobs:
|
||||||
# some tests expect this umask, and arm images have a different default
|
# some tests expect this umask, and arm images have a different default
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
${{inputs.go-test-flags}}
|
|
||||||
|
|
||||||
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
||||||
--format=short-verbose \
|
--format=short-verbose \
|
||||||
--jsonfile /tmp/jsonfile/go-test.log \
|
--jsonfile /tmp/jsonfile/go-test.log \
|
||||||
|
@ -108,7 +106,7 @@ jobs:
|
||||||
--packages="$PACKAGE_NAMES" \
|
--packages="$PACKAGE_NAMES" \
|
||||||
--junitfile ${{env.TEST_RESULTS}}/gotestsum-report.xml -- \
|
--junitfile ${{env.TEST_RESULTS}}/gotestsum-report.xml -- \
|
||||||
-tags="${{env.GOTAGS}}" \
|
-tags="${{env.GOTAGS}}" \
|
||||||
${GO_TEST_FLAGS-} \
|
${{inputs.go-test-flags}} \
|
||||||
-cover -coverprofile=coverage.txt \
|
-cover -coverprofile=coverage.txt \
|
||||||
-timeout=30m
|
-timeout=30m
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,9 @@ var defaultGrpcTlsAddr = net.TCPAddrFromAddrPort(netip.MustParseAddrPort("127.0.
|
||||||
// checks for warnings on deprecated fields and flags. These tests
|
// checks for warnings on deprecated fields and flags. These tests
|
||||||
// should check one option at a time if possible
|
// should check one option at a time if possible
|
||||||
func TestLoad_IntegrationWithFlags(t *testing.T) {
|
func TestLoad_IntegrationWithFlags(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
dataDir := testutil.TempDir(t, "config")
|
dataDir := testutil.TempDir(t, "config")
|
||||||
|
|
||||||
run := func(t *testing.T, tc testCase) {
|
run := func(t *testing.T, tc testCase) {
|
||||||
|
|
|
@ -628,6 +628,9 @@ func TestVaultCAProvider_SignLeaf(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestVaultCAProvider_CrossSignCA(t *testing.T) {
|
func TestVaultCAProvider_CrossSignCA(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
SkipIfVaultNotPresent(t)
|
SkipIfVaultNotPresent(t)
|
||||||
|
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
|
@ -355,6 +355,9 @@ func patchExecArgs(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMakeBootstrapPipe_DoesNotBlockOnAFullPipe(t *testing.T) {
|
func TestMakeBootstrapPipe_DoesNotBlockOnAFullPipe(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
// A named pipe can buffer up to 64k, use a value larger than that
|
// A named pipe can buffer up to 64k, use a value larger than that
|
||||||
bootstrap := bytes.Repeat([]byte("a"), 66000)
|
bootstrap := bytes.Repeat([]byte("a"), 66000)
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLessReference(t *testing.T) {
|
func TestLessReference(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
parseTenancy := func(s string) *pbresource.Tenancy {
|
parseTenancy := func(s string) *pbresource.Tenancy {
|
||||||
// format is: <partition>.<peerName>.<namespace>
|
// format is: <partition>.<peerName>.<namespace>
|
||||||
parts := strings.Split(s, ".")
|
parts := strings.Split(s, ".")
|
||||||
|
|
|
@ -15,6 +15,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBackend_Conformance(t *testing.T) {
|
func TestBackend_Conformance(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
conformance.Test(t, conformance.TestOptions{
|
conformance.Test(t, conformance.TestOptions{
|
||||||
NewBackend: func(t *testing.T) storage.Backend {
|
NewBackend: func(t *testing.T) storage.Backend {
|
||||||
backend, err := inmem.NewBackend()
|
backend, err := inmem.NewBackend()
|
||||||
|
|
|
@ -23,6 +23,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBackend_Conformance(t *testing.T) {
|
func TestBackend_Conformance(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("too slow for testing.Short")
|
||||||
|
}
|
||||||
t.Run("Leader", func(t *testing.T) {
|
t.Run("Leader", func(t *testing.T) {
|
||||||
conformance.Test(t, conformance.TestOptions{
|
conformance.Test(t, conformance.TestOptions{
|
||||||
NewBackend: func(t *testing.T) storage.Backend {
|
NewBackend: func(t *testing.T) storage.Backend {
|
||||||
|
|
Loading…
Reference in New Issue