Commit dbde218
authored
allocation: fix up random long usage with inclusive bound (elastic#139163)
In the write load constraint monitor tests, the criteria for specifying a
non-hotspot node generated a random queue latency between 0 and the hotspot
threshold setting. In usage, the random number generation used the threshold as
an inclusive bound, while it needed to be an exclusive bound. This became an
issue recently, with the addition of tests that specify a certain number of
hotspot nodes, and remove them individually throughout the test
(testHotspotCountTurnsOff).
Fixes: elastic#1391611 parent 0a4ec40 commit dbde218
File tree
2 files changed
+2
-4
lines changed- server/src/test/java/org/elasticsearch/cluster/routing/allocation
2 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | 506 | | |
510 | 507 | | |
511 | 508 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| 663 | + | |
663 | 664 | | |
664 | 665 | | |
665 | 666 | | |
| |||
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
693 | | - | |
| 694 | + | |
694 | 695 | | |
695 | 696 | | |
696 | 697 | | |
| |||
0 commit comments