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

[dlp] fix: add retry count to mitigate the flake #4152

Merged
merged 1 commit into from
Jun 24, 2020
Merged
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
20 changes: 10 additions & 10 deletions dlp/risk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def bigquery_project():
bigquery_client.delete_dataset(dataset_ref, delete_contents=True)


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_numerical_risk_analysis(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -184,7 +184,7 @@ def test_numerical_risk_analysis(
assert "Value Range:" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_categorical_risk_analysis_on_string_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -203,7 +203,7 @@ def test_categorical_risk_analysis_on_string_field(
assert "Most common value occurs" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_categorical_risk_analysis_on_number_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -222,7 +222,7 @@ def test_categorical_risk_analysis_on_number_field(
assert "Most common value occurs" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_k_anonymity_analysis_single_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -242,7 +242,7 @@ def test_k_anonymity_analysis_single_field(
assert "Class size:" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_k_anonymity_analysis_multiple_fields(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -262,7 +262,7 @@ def test_k_anonymity_analysis_multiple_fields(
assert "Class size:" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_l_diversity_analysis_single_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -284,7 +284,7 @@ def test_l_diversity_analysis_single_field(
assert "Sensitive value" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_l_diversity_analysis_multiple_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -306,7 +306,7 @@ def test_l_diversity_analysis_multiple_field(
assert "Sensitive value" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_k_map_estimate_analysis_single_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -328,7 +328,7 @@ def test_k_map_estimate_analysis_single_field(
assert "Values" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_k_map_estimate_analysis_multiple_field(
topic_id, subscription_id, bigquery_project, capsys
):
Expand All @@ -350,7 +350,7 @@ def test_k_map_estimate_analysis_multiple_field(
assert "Values" in out


@pytest.mark.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_k_map_estimate_analysis_quasi_ids_info_types_equal(
topic_id, subscription_id, bigquery_project
):
Expand Down