This commit is contained in:
wt committed 2026-07-30 20:07:51 +07:00
commit 92660a4ba0
228 files changed
+24496

No files matched your search

@@ -0,0 +1,22 @@
import XCTest
@testable import Luma
final class ArchiveMessageBatchPolicyTests: XCTestCase {
func testMamPagesStaySmallEnoughForInteractiveUI() {
XCTAssertLessThanOrEqual(ArchiveMessageBatchPolicy.pageSize, 32)
XCTAssertGreaterThan(ArchiveMessageBatchPolicy.pageSize, 0)
}
func testOnlyOneStanzaIsDecodedPerMainActorSlice() {
XCTAssertEqual(ArchiveMessageBatchPolicy.decodeSliceSize, 1)
XCTAssertGreaterThan(ArchiveMessageBatchPolicy.interSliceDelayNanoseconds, 0)
}
func testInboxCanHoldAProtocolViolatingDoublePageWithoutGrowingForever() {
XCTAssertGreaterThanOrEqual(
ArchiveMessageBatchPolicy.maximumBufferedStanzas,
ArchiveMessageBatchPolicy.pageSize * 2
)
XCTAssertLessThanOrEqual(ArchiveMessageBatchPolicy.maximumBufferedStanzas, 128)
}
}