This repository was archived by the owner on Jun 20, 2025. It is now read-only.
Commit d57d61e
Fix a Flaky Test in CalculatorAppTest (#1919)
Summary:
Pull Request resolved: #1919
## What
Modified CalculatorGame's `playFromSecretShare` method to return a dummy item with the publisherBreakdown field populated with dummy items as well, when the number of rows is zero.
Added test cases for empty intersection.
Added "long_running" and "heavyweight" tags to the test target, to reduce the probability of tests timing out.
## Why
A Calculator app test with random input shows as flaky. After investigation, it seems that the test fails when 1) UDP is turned on and 2) the intersection size = 0. In this case, both expected and actual results are dummy, but their formats are different, causing the test to fail.
The intersection size = 0 happens with a small probability, which is why the test only fails sometimes.
There are also some tests in the suite that requires longer than 600 seconds to run. So I added the tags to increase the timeout limit.
## Investigation process
https://docs.google.com/document/d/1raKj9_aaXUED5oCc48ICc5qyf_Anp0Fcy79ZhzV_YTM/edit#
Reviewed By: robotal
Differential Revision: D41241066
fbshipit-source-id: ba0ecbba728c8f357ab19dfd534bca09796d191e1 parent 12452c6 commit d57d61e
File tree
4 files changed
+73
-8
lines changed- fbpcs/emp_games/lift/pcf2_calculator
- input_processing
- test
4 files changed
+73
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
Lines changed: 66 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
356 | 359 | | |
357 | 360 | | |
358 | 361 | | |
359 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| |||
386 | 391 | | |
387 | 392 | | |
388 | 393 | | |
389 | | - | |
| 394 | + | |
| 395 | + | |
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
394 | | - | |
| 400 | + | |
395 | 401 | | |
396 | 402 | | |
397 | 403 | | |
| |||
426 | 432 | | |
427 | 433 | | |
428 | 434 | | |
| 435 | + | |
429 | 436 | | |
430 | 437 | | |
431 | 438 | | |
| |||
462 | 469 | | |
463 | 470 | | |
464 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
465 | 524 | | |
466 | 525 | | |
467 | 526 | | |
| |||
478 | 537 | | |
479 | 538 | | |
480 | 539 | | |
481 | | - | |
| 540 | + | |
| 541 | + | |
482 | 542 | | |
483 | 543 | | |
484 | 544 | | |
| |||
530 | 590 | | |
531 | 591 | | |
532 | 592 | | |
533 | | - | |
| 593 | + | |
| 594 | + | |
534 | 595 | | |
535 | 596 | | |
536 | 597 | | |
| |||
0 commit comments