KEYCLOAK-2608
Timestamp resolution of 1s for Event.time is inappropriate for use with tests
This commit is contained in:
1 parent
d05a139a5f
commit
05ee844bf6
2 files changed
+5
-1
No files matched your search
@@ -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()) {
|
||||
|
||||
Reference in new issue
Block a user