Project

General

Profile

Actions

Bug #79957

closed
KC KC

mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() reads

Bug #79957: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() reads

Added by Kefu Chai 3 months ago. Updated 8 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid tentacle umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-2700-g80fe42503a
Released In:
Upkeep Timestamp:
2026-11-26T00:58:30+00:00

Description

test_created_now compares two independent datetime.now() readings field
by field. One is taken inside Schedule.__init__ when the simple_schedule
fixture is built, the other in the test body. When a minute boundary
falls between the two reads, the fields differ and the test fails:

    >       assert simple_schedule.created.minute == now.minute
    E       assert 13 == 14
    E        +  where 13 = datetime.datetime(2026, 7, 2, 11, 13, 59, 998283).minute
    E        +    where datetime.datetime(2026, 7, 2, 11, 14, 0, 15569).minute


test_start_default_midnight has the same shape. It compares start's
day/month/year against a third now() read in the test body, and start
and created come from two separate now() calls in Schedule.__init__
(schedule.py:111 and :119). It needs a UTC midnight rollover rather than
a minute rollover, so it is much rarer and has not been reported.

Related issues 3 (0 open — 3 closed)

Copied to mgr - Backport #79982: tentacle: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() readsResolvedKefu Chai

Actions
Copied to mgr - Backport #79983: umbrella: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() readsResolvedKefu Chai

Actions
Copied to mgr - Backport #79984: squid: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() readsResolvedKefu Chai

Actions

UB Updated by Upkeep Bot 3 months ago Actions #1

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to 80fe42503a7198cc5f1235ccbdf50036368e63b4
  • Fixed In set to v21.3.0-2700-g80fe42503a
  • Upkeep Timestamp set to 2026-08-27T07:48:10+00:00

UB Updated by Upkeep Bot 3 months ago Actions #2

  • Copied to Backport #79982: tentacle: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() reads added

UB Updated by Upkeep Bot 3 months ago Actions #3

  • Copied to Backport #79983: umbrella: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() reads added

UB Updated by Upkeep Bot 3 months ago Actions #4

  • Copied to Backport #79984: squid: mgr/snap_schedule: test_created_now fails when the clock ticks between two datetime.now() reads added

UB Updated by Upkeep Bot 3 months ago Actions #5

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #6

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-08-27T07:48:10+00:00 to 2026-08-27T15:35:01+00:00

UB Updated by Upkeep Bot 8 days ago Actions #7

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-08-27T15:35:01+00:00 to 2026-11-26T00:58:30+00:00
Actions

Also available in: PDF Atom