-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimal Fix auth code cleanup function (#2292)
* fix: incorrect elapsed time determination * A recent previous refactor commit was using the `getNano()` method, thinking that it would return the total number of nanoseconds in the duration, which is does not. It returns the number of nanoseconds within one second, which is not at all what we wanted. * We decided to go ahead and just use the `getSeconds` method, which this time actually returns the total number of seconds in the duration object. We understand that previously the precision of this was to the millisecond level. We believe that it's OK if we change to the second level. The cleanup will still happen every n minutes, just not at the precise millisecond. Co-Authored-by: Bruce Ricard <bricard@vmware.com> * update the lastClean instant and adapt tests * update the lastClean instant and adapt tests * initial setting of lastClean * fix expected value * change new lastClean to now as discussed with Bruce in weekly meeting * create mock for Duration and remove the Sleep * reduce the fix to the minimum needed * add SQL counting test * simplify test and verification run 10 times, without extra call SQL itself not needed to be verified, but check on usage of getConnection * Update UaaTokenStoreTests.java --------- Co-authored-by: Alicia Yingling <yalicia@vmware.com> Co-authored-by: Bruce Ricard <bricard@vmware.com>
- Loading branch information
1 parent
53d8340
commit 59fbf8e
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters