From 72880ddb8f4e5cd896e0b6570d134a21682a0c13 Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 25 Sep 2024 08:58:13 +0100 Subject: [PATCH] Fix activity log unit test --- .../me/lucko/spark/common/activitylog/ActivityLogTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spark-common/src/test/java/me/lucko/spark/common/activitylog/ActivityLogTest.java b/spark-common/src/test/java/me/lucko/spark/common/activitylog/ActivityLogTest.java index a94f954a..4891960b 100644 --- a/spark-common/src/test/java/me/lucko/spark/common/activitylog/ActivityLogTest.java +++ b/spark-common/src/test/java/me/lucko/spark/common/activitylog/ActivityLogTest.java @@ -36,9 +36,11 @@ public class ActivityLogTest { @Test public void testSaveLoad(@TempDir Path tempDir) { + long time = System.currentTimeMillis(); + ActivityLog log = new ActivityLog(tempDir.resolve("activity-log.json")); - log.addToLog(Activity.fileActivity(USER, 1721937782184L, "Profiler", "path/to/profile.sparkprofile")); - log.addToLog(Activity.urlActivity(USER, 1721937782184L, "Profiler", "https://spark.lucko.me/abcd")); + log.addToLog(Activity.fileActivity(USER, time, "Profiler", "path/to/profile.sparkprofile")); + log.addToLog(Activity.urlActivity(USER, time, "Profiler", "https://spark.lucko.me/abcd")); log.save(); ActivityLog log2 = new ActivityLog(tempDir.resolve("activity-log.json"));