Skip to content

Commit

Permalink
incremental steps
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Apr 12, 2024
1 parent 5d2748d commit 4f11f92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/js/node/http/node-http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1758,8 +1758,10 @@ it("#10177 response.write with non-ascii latin1 should not cause duplicated char
// 128 = small than waterMark, 256 = waterMark, 1024 = large than waterMark
// 8Kb = small than cork buffer
// 16Kb = cork buffer
// 64Kb = large than cork buffer
const sizes = [128, 256, 1024, 8 * 1024, 16 * 1024, 64 * 1024];
// 32Kb = large than cork buffer
const start_size = 128;
const increment_step = 1024;
const end_size = 32 * 1024;
let expected = "";

function finish(err) {
Expand All @@ -1778,7 +1780,7 @@ it("#10177 response.write with non-ascii latin1 should not cause duplicated char
expect(port).toBeGreaterThan(0);

for (const char of chars) {
for (const size of sizes) {
for (let size = start_size; size <= end_size; size += increment_step) {
expected = char + "-".repeat(size) + "x";

try {
Expand Down

0 comments on commit 4f11f92

Please sign in to comment.