mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-29 16:15:54 +00:00
24661ea969
Also, skip the error "partition already exists" because that happens when multiple nodes interact with the same database.
17 lines
614 B
Nim
17 lines
614 B
Nim
{.used.}
|
|
|
|
import testutils/unittests, chronos
|
|
import
|
|
../../../waku/waku_archive/driver/postgres_driver/partitions_manager,
|
|
../../../waku/waku_core/time
|
|
|
|
suite "Partition Manager":
|
|
test "Calculate end partition time":
|
|
# 1717372850 == Mon Jun 03 2024 00:00:50 GMT+0000
|
|
# 1717376400 == Mon Jun 03 2024 01:00:00 GMT+0000
|
|
check 1717376400 == partitions_manager.calcEndPartitionTime(Timestamp(1717372850))
|
|
|
|
# 1717372800 == Mon Jun 03 2024 00:00:00 GMT+0000
|
|
# 1717376400 == Mon Jun 03 2024 01:00:00 GMT+0000
|
|
check 1717376400 == partitions_manager.calcEndPartitionTime(Timestamp(1717372800))
|