Skip to content

Commit fcaabcf

Browse files
committed
print error when error
1 parent 98eabf9 commit fcaabcf

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

qa/L0_http/generate_endpoint_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@ def test_type_size_explosion(self):
282282
input_bytes = bytes(input_data)
283283
input_str = base64.b64encode(input_bytes).decode("utf-8")
284284
inputs = {"PROMPT": input_str, "STREAM": False}
285-
error_msg = "Request JSON size of 89478519 + 22369655 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
285+
error_msg = " bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
286286
self.generate_expect_failure(self._model_name, inputs, error_msg)
287287

288288
inputs = {
289289
"INPUT0": input_str[0 : (len(input_str) // 2)],
290290
"INPUT1": input_str[(len(input_str) // 2) :],
291291
"STREAM": False,
292292
}
293-
error_msg = "Request JSON size of 89478533 + 22369669 bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
293+
error_msg = " bytes exceeds the maximum allowed input size. Use --http-max-input-size to increase the limit."
294294
self.generate_expect_failure(self._model_name, inputs, error_msg)
295295

296296
def test_duplicate_inputs(self):

qa/L0_http/test.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,13 @@ if [ "$code" != "200" ]; then
380380
RET=1
381381
fi
382382
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "1" ]; then
383+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] not found in output when expected"
384+
cat ./curl.out
383385
RET=1
384386
fi
385387
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "1" ]; then
388+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] not found in output when expected"
389+
cat ./curl.out
386390
RET=1
387391
fi
388392

@@ -397,9 +401,13 @@ if [ "$code" != "200" ]; then
397401
RET=1
398402
fi
399403
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "0" ]; then
404+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] found in output when not expected"
405+
cat ./curl.out
400406
RET=1
401407
fi
402408
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "1" ]; then
409+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] not found in output when expected"
410+
cat ./curl.out
403411
RET=1
404412
fi
405413

@@ -414,9 +422,13 @@ if [ "$code" != "200" ]; then
414422
RET=1
415423
fi
416424
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "0" ]; then
425+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] found in output when not expected"
426+
cat ./curl.out
417427
RET=1
418428
fi
419429
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "1" ]; then
430+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] not found in output when expected"
431+
cat ./curl.out
420432
RET=1
421433
fi
422434

@@ -431,9 +443,13 @@ if [ "$code" != "200" ]; then
431443
RET=1
432444
fi
433445
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "0" ]; then
446+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] found in output when not expected"
447+
cat ./curl.out
434448
RET=1
435449
fi
436450
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "0" ]; then
451+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] found in output when not expected"
452+
cat ./curl.out
437453
RET=1
438454
fi
439455

@@ -449,9 +465,13 @@ if [ "$code" != "200" ]; then
449465
RET=1
450466
fi
451467
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "1" ]; then
468+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] not found in output when expected"
469+
cat ./curl.out
452470
RET=1
453471
fi
454472
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "1" ]; then
473+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] not found in output when expected"
474+
cat ./curl.out
455475
RET=1
456476
fi
457477

@@ -466,6 +486,8 @@ if [ "$code" == "200" ]; then
466486
RET=1
467487
fi
468488
if [ `grep -c "\{\"error\":\"Unable to parse 'data': Shape does not match true shape of 'data' field\"\}" ./curl.out` != "1" ]; then
489+
echo "\{\"error\":\"Unable to parse 'data': Shape does not match true shape of 'data' field\"\} not found in output when expected"
490+
cat ./curl.out
469491
RET=1
470492
fi
471493

@@ -479,6 +501,8 @@ if [ "$code" == "200" ]; then
479501
RET=1
480502
fi
481503
if [ `grep -c "\{\"error\":\"Unable to parse 'data': Shape does not match true shape of 'data' field\"\}" ./curl.out` != "1" ]; then
504+
echo "\{\"error\":\"Unable to parse 'data': Shape does not match true shape of 'data' field\"\} not found in output when expected"
505+
cat ./curl.out
482506
RET=1
483507
fi
484508

@@ -493,9 +517,13 @@ if [ "$code" != "200" ]; then
493517
RET=1
494518
fi
495519
if [ `grep -c "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\]" ./curl.out` != "1" ]; then
520+
echo "\[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32\] not found in output when expected"
521+
cat ./curl.out
496522
RET=1
497523
fi
498524
if [ `grep -c "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\]" ./curl.out` != "1" ]; then
525+
echo "\[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\] not found in output when expected"
526+
cat ./curl.out
499527
RET=1
500528
fi
501529

0 commit comments

Comments
 (0)