Frun1na opened a new issue, #4573:
URL: https://github.com/apache/rocketmq-dashboard/issues/4573

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   branch: `master`, git commit id: `d50ffecc`
   
   ### Runtime Environment
   
   Ubuntu 24.04 (WSL2), JDK Temurin 21, MySQL 8.0.46 (project dev profile). The 
defect is in a test, not the deployed app.
   
   
   
   ### Connected RocketMQ Cluster
   
   Not applicable — the failing test only exercises the auth/session aggregate 
against the local database.
   
   
   
   ### Build Toolchain
   
   _No response_
   
   ### Describe the Bug
   
   
`AuthServiceSessionOverviewIntegrationTest.listActiveSessionsForUserReturnsOnlyThatUsersActiveSessionDetailsTest`
 fails intermittently: it inserts a session with `last_seen_at = 
LocalDateTime.now() - 1 minute` and asserts `idleSeconds >= 60`, but observed 
`idleSeconds = 59`. The session table stores `last_seen_at` / `expires_at` as 
`DATETIME` (second precision), and MySQL rounds stored values up, so when the 
test starts in the second half of a second the stored value reads back one 
second younger and `Duration.getSeconds()` truncates it to 59. The same applies 
to the 20-minute stale assertion (1199 < 1200).
   
   
   
   ### Steps to Reproduce
   
   1. Check out `master@d50ffecc` and run `cd server && mvn -B -ntp test` 
repeatedly.
   2. Runs where the test class starts with the wall clock in the second half 
of a second fail with "Expecting actual: 59".
   3. Confirm the rounding on the dev database: `SELECT CAST('2026-09-20 
10:00:00.7' AS DATETIME)` returns `2026-09-20 10:00:01`.
   
   ### What Did You Expect to See?
   
   The test to pass deterministically on every run.
   
   
   
   ### What Did You See Instead?
   
   A flaky failure (observed 2026-09-19 on a full-suite run: 2414 tests, this 
single failure).
   
   
   
   ### Additional Context
   
   Draft fix in PR #4572: the test truncates its base timestamp to whole 
seconds so the stored values are exact. Test-only change, no production code 
touched.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [ ] Yes, I am willing to submit a pull request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to