Fixing randomly failing EoS report tests by martinboulais · Pull Request #1601 · AliceO2Group/Bookkeeping

@martinboulais

I DON'T have JIRA ticket

  • explain what this PR does

Notable changes for developers:

  • Fixed EoS report tests that fails during the shift transition period (30 minutes after start of new shifts)

@martinboulais

@martinboulais

@martinboulais

xsalonx

Comment on lines 71 to +81

// Find EoS reports from the last shift with the correct title
const pastShift = getShiftFromTimestamp(shift.start - SHIFT_DURATION);
const pastShift = await this.getUserPreviousShiftOrFail(shifterUserIdentifier);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accoriding to docs, it doesn't return Promise

@isaachilly

@codecov

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.70%. Comparing base (7f6dbfd) to head (1953d20).
⚠️ Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
lib/server/services/shift/ShiftService.js 0.00% 5 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (7f6dbfd) and HEAD (1953d20). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (7f6dbfd) HEAD (1953d20)
17 13
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1601      +/-   ##
==========================================
- Coverage   45.68%   35.70%   -9.98%     
==========================================
  Files        1031     1031              
  Lines       17206    17206              
  Branches     3134     3134              
==========================================
- Hits         7861     6144    -1717     
- Misses       9345    11062    +1717     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.