14 lines
496 B
Go
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)
|
|
}
|
|
}
|