Skip to content

Commit

Permalink
Revert retry (#4673)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreYang authored Oct 3, 2019
1 parent 47e2066 commit 57c563e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/templates/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ parameters:

steps:
- ${{ if eq(parameters.test, 'true') }}:
- script: ddev test --cov --retry 3 --pytest-args="--junitxml=junit/test-results.xml" ${{ parameters.check }}
- script: ddev test --cov --pytest-args="--junitxml=junit/test-results.xml" ${{ parameters.check }}
displayName: 'Run tests'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)

- ${{ if eq(parameters.test_e2e, 'true') }}:
- script: ddev env test --base --new-env --profile-memory --retry 3 ${{ parameters.check }}
- script: ddev env test --base --new-env --profile-memory ${{ parameters.check }}
displayName: 'Run E2E tests'
env:
DD_API_KEY: $(DD_API_KEY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
)
@click.option('--new-env', '-ne', is_flag=True, help='Execute setup and tear down actions')
@click.option('--profile-memory', '-pm', is_flag=True, help='Whether to collect metrics about memory usage')
@click.option('--retry', '-r', help='Number of retries for each tox env', type=click.INT)
@click.pass_context
def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memory, retry):
def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memory):
"""Test an environment."""
check_envs = get_tox_envs(checks, e2e_tests_only=True)
tests_ran = False
Expand Down Expand Up @@ -101,10 +100,10 @@ def test(ctx, checks, agent, python, dev, base, env_vars, new_env, profile_memor
checks=['{}:{}'.format(check, env)],
e2e=True,
passenv=' '.join(persisted_env_vars) if persisted_env_vars else None,
retry=retry,
)
finally:
if new_env:
ctx.invoke(stop, check=check, env=env)

if not tests_ran:
echo_info('Nothing to test!')
10 changes: 3 additions & 7 deletions datadog_checks_dev/datadog_checks/dev/tooling/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from ..constants import get_root
from ..testing import construct_pytest_options, fix_coverage_report, get_tox_envs, pytest_coverage_sources
from .console import CONTEXT_SETTINGS, abort, echo_info, echo_success, echo_waiting, echo_warning
from .utils import run_command_with_retry


def display_envs(check_envs):
Expand Down Expand Up @@ -40,7 +39,6 @@ def display_envs(check_envs):
@click.option('--changed', is_flag=True, help='Only test changed checks')
@click.option('--cov-keep', is_flag=True, help='Keep coverage reports')
@click.option('--pytest-args', '-pa', help='Additional arguments to pytest')
@click.option('--retry', '-r', help='Number of retries for each tox env', type=click.INT)
@click.pass_context
def test(
ctx,
Expand All @@ -61,7 +59,6 @@ def test(
changed,
cov_keep,
pytest_args,
retry,
):
"""Run tests for Agent-based checks.
Expand Down Expand Up @@ -166,15 +163,14 @@ def test(
echo_waiting(wait_text)
echo_waiting('-' * len(wait_text))

result = run_command_with_retry(
retry=retry,
command='tox '
result = run_command(
'tox '
# so users won't get failures for our possibly strict CI requirements
'--skip-missing-interpreters '
# so coverage tracks the real locations instead of .tox virtual envs
'--develop '
# comma-separated list of environments
'-e {}'.format(','.join(envs)),
'-e {}'.format(','.join(envs))
)
if result.code:
abort('\nFailed!', code=result.code)
Expand Down
37 changes: 0 additions & 37 deletions datadog_checks_dev/datadog_checks/dev/tooling/commands/utils.py

This file was deleted.

48 changes: 0 additions & 48 deletions datadog_checks_dev/tests/tooling/commands/test_utils.py

This file was deleted.

0 comments on commit 57c563e

Please sign in to comment.