Files
iotlcm/server/internal/logic/iot/cardpackage/repository_test.go
T
2026-10-29 14:36:49 +08:00

14 lines
496 B
Go

package cardpackage
import "testing"
func TestCardPackageBindChunkSizeSupportsFiftyThousandCards(t *testing.T) {
const totalCards = 50000
if cardPackageBindInsertBatchSize <= 0 || cardPackageBindInsertBatchSize > 500 {
t.Fatalf("cardPackageBindInsertBatchSize = %d, want 1..500", cardPackageBindInsertBatchSize)
}
if chunks := (totalCards + cardPackageBindInsertBatchSize - 1) / cardPackageBindInsertBatchSize; chunks != 100 {
t.Fatalf("bind insert chunks = %d, want 100", chunks)
}
}