KEYCLOAK-2608
Timestamp resolution of 1s for Event.time is inappropriate for use with tests
This commit is contained in:
parent
dfa7c76331
commit
134c9b11c0
2 changed files with 5 additions and 1 deletions
|
@ -30,6 +30,10 @@ public class Time {
|
|||
return ((int) (System.currentTimeMillis() / 1000)) + offset;
|
||||
}
|
||||
|
||||
public static long currentTimeMillis() {
|
||||
return System.currentTimeMillis() + (offset * 1000);
|
||||
}
|
||||
|
||||
public static Date toDate(int time) {
|
||||
return new Date(((long) time ) * 1000);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ public class EventBuilder {
|
|||
}
|
||||
|
||||
private void send() {
|
||||
event.setTime(Time.toMillis(Time.currentTime()));
|
||||
event.setTime(Time.currentTimeMillis());
|
||||
|
||||
if (store != null) {
|
||||
if (realm.getEnabledEventTypes() != null && !realm.getEnabledEventTypes().isEmpty() ? realm.getEnabledEventTypes().contains(event.getType().name()) : event.getType().isSaveByDefault()) {
|
||||
|
|
Loading…
Reference in a new issue