Skip to content

Commit

Permalink
fix: flaky test for alerts and reports (apache#14347)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar authored Apr 26, 2021
1 parent 0258fc7 commit db7029b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/reports/commands_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,9 @@ def get_notification_error_sent_count(report_schedule: ReportSchedule) -> int:
def assert_log(state: str, error_message: Optional[str] = None):
db.session.commit()
logs = db.session.query(ReportExecutionLog).all()
if state == ReportState.WORKING:
assert len(logs) == 2
assert logs[1].error_message == error_message
assert logs[1].state == state
return
# On error we send an email

if state == ReportState.ERROR:
# On error we send an email
assert len(logs) == 3
else:
assert len(logs) == 2
Expand Down

0 comments on commit db7029b

Please sign in to comment.