Skip to content

Commit

Permalink
[dlp] fix: add retry count to mitigate the flake (#4152)
Browse files Browse the repository at this point in the history
fixes #4100
  • Loading branch information
Takashi Matsuo authored Jun 24, 2020
1 parent 56a9d1c commit 22ba0ce
Showing 1 changed file with 10 additions and 10 deletions.
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

0 comments on commit 22ba0ce

Please sign in to comment.