mirror of
https://github.com/jie65535/JChatGPT.git
synced 2026-09-15 02:56:10 +08:00
profile: schedule daily group updates
This commit is contained in:
@@ -62,6 +62,8 @@ class ProfileHistoryReaderTest {
|
||||
insert(1, 20, 110, kind = MessageSourceKind.FRIEND)
|
||||
insert(2, 30, 100)
|
||||
insert(2, 30, 110)
|
||||
insert(1, 40, 100)
|
||||
insert(1, 40, 1_000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +82,13 @@ class ProfileHistoryReaderTest {
|
||||
listOf(10L, 20L),
|
||||
reader.filterGroupRangesByMinimumMessageCount(ranges, 1).map { it.groupId },
|
||||
)
|
||||
assertEquals(
|
||||
listOf(10L, 30L),
|
||||
reader.filterGroupRangesByOldestPendingMessageTime(
|
||||
ranges = ranges + ProfileHistoryReader.GroupTimeBounds(1, 40, 90, 1_001),
|
||||
oldestAllowedTime = 115,
|
||||
).map { it.groupId },
|
||||
)
|
||||
} finally {
|
||||
directory.toFile().deleteRecursively()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user