@@ -1479,8 +1479,8 @@ describe("wrangler", () => {
1479
1479
expect ( params . namespaceId ) . toEqual ( expectedNamespaceId ) ;
1480
1480
expect ( await request . json ( ) ) . toEqual (
1481
1481
expectedKeyValues . slice (
1482
- ( requests . count - 1 ) * 5000 ,
1483
- requests . count * 5000
1482
+ ( requests . count - 1 ) * 1000 ,
1483
+ requests . count * 1000
1484
1484
)
1485
1485
) ;
1486
1486
return HttpResponse . json ( createFetchResult ( null ) , {
@@ -1510,7 +1510,7 @@ describe("wrangler", () => {
1510
1510
expect ( std . err ) . toMatchInlineSnapshot ( `""` ) ;
1511
1511
} ) ;
1512
1512
1513
- it ( "should put the key-values in batches of 5000 parsed from a file" , async ( ) => {
1513
+ it ( "should put the key-values in batches of 1000 parsed from a file" , async ( ) => {
1514
1514
const keyValues : KeyValue [ ] = new Array ( 12000 ) . fill ( {
1515
1515
key : "someKey1" ,
1516
1516
value : "someValue1" ,
@@ -1520,14 +1520,23 @@ describe("wrangler", () => {
1520
1520
await runWrangler (
1521
1521
`kv bulk put --namespace-id some-namespace-id keys.json`
1522
1522
) ;
1523
- expect ( requests . count ) . toEqual ( 3 ) ;
1523
+ expect ( requests . count ) . toEqual ( 12 ) ;
1524
1524
expect ( std . out ) . toMatchInlineSnapshot ( `
1525
- "Uploaded 0% (0 out of 12,000)
1526
- Uploaded 41% (5,000 out of 12,000)
1527
- Uploaded 83% (10,000 out of 12,000)
1528
- Uploaded 100% (12,000 out of 12,000)
1529
- Success!"
1530
- ` ) ;
1525
+ "Uploaded 0% (0 out of 12,000)
1526
+ Uploaded 8% (1,000 out of 12,000)
1527
+ Uploaded 16% (2,000 out of 12,000)
1528
+ Uploaded 25% (3,000 out of 12,000)
1529
+ Uploaded 33% (4,000 out of 12,000)
1530
+ Uploaded 41% (5,000 out of 12,000)
1531
+ Uploaded 50% (6,000 out of 12,000)
1532
+ Uploaded 58% (7,000 out of 12,000)
1533
+ Uploaded 66% (8,000 out of 12,000)
1534
+ Uploaded 75% (9,000 out of 12,000)
1535
+ Uploaded 83% (10,000 out of 12,000)
1536
+ Uploaded 91% (11,000 out of 12,000)
1537
+ Uploaded 100% (12,000 out of 12,000)
1538
+ Success!"
1539
+ ` ) ;
1531
1540
expect ( std . warn ) . toMatchInlineSnapshot ( `""` ) ;
1532
1541
expect ( std . err ) . toMatchInlineSnapshot ( `""` ) ;
1533
1542
} ) ;
@@ -1629,8 +1638,8 @@ describe("wrangler", () => {
1629
1638
) ;
1630
1639
expect ( await request . json ( ) ) . toEqual (
1631
1640
expectedKeys . slice (
1632
- ( requests . count - 1 ) * 5000 ,
1633
- requests . count * 5000
1641
+ ( requests . count - 1 ) * 1000 ,
1642
+ requests . count * 1000
1634
1643
)
1635
1644
) ;
1636
1645
return HttpResponse . json ( createFetchResult ( null ) , {
@@ -1670,14 +1679,23 @@ describe("wrangler", () => {
1670
1679
await runWrangler (
1671
1680
`kv bulk delete --namespace-id some-namespace-id keys.json`
1672
1681
) ;
1673
- expect ( requests . count ) . toEqual ( 3 ) ;
1682
+ expect ( requests . count ) . toEqual ( 12 ) ;
1674
1683
expect ( std . out ) . toMatchInlineSnapshot ( `
1675
- "Deleted 0% (0 out of 12,000)
1676
- Deleted 41% (5,000 out of 12,000)
1677
- Deleted 83% (10,000 out of 12,000)
1678
- Deleted 100% (12,000 out of 12,000)
1679
- Success!"
1680
- ` ) ;
1684
+ "Deleted 0% (0 out of 12,000)
1685
+ Deleted 8% (1,000 out of 12,000)
1686
+ Deleted 16% (2,000 out of 12,000)
1687
+ Deleted 25% (3,000 out of 12,000)
1688
+ Deleted 33% (4,000 out of 12,000)
1689
+ Deleted 41% (5,000 out of 12,000)
1690
+ Deleted 50% (6,000 out of 12,000)
1691
+ Deleted 58% (7,000 out of 12,000)
1692
+ Deleted 66% (8,000 out of 12,000)
1693
+ Deleted 75% (9,000 out of 12,000)
1694
+ Deleted 83% (10,000 out of 12,000)
1695
+ Deleted 91% (11,000 out of 12,000)
1696
+ Deleted 100% (12,000 out of 12,000)
1697
+ Success!"
1698
+ ` ) ;
1681
1699
expect ( std . warn ) . toMatchInlineSnapshot ( `""` ) ;
1682
1700
expect ( std . err ) . toMatchInlineSnapshot ( `""` ) ;
1683
1701
} ) ;
0 commit comments