You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bug]: Map addressToNum is the result of weighted random selection for 100000 times. Key is a address and value is times. The weight of "192.168.0.3":"192.168.0.2":"192.168.0.1" is 4:2:1. So addressToNum.get("192.168.0.3") should ≈ addressToNum.get("192.168.0.2") * 2.
Three cases, pairwise verification should be conducted, otherwise the verification is insufficient.
In java 9 and later version, Reflection access private field is regard as illegal reflective access operation. It cause warning, even exception according to VM options.
It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature.
If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue.
Search before asking
Enhancement Request
org.apache.eventmesh.common.loadbalance.RandomLoadBalanceSelectorTest
This method of verifying no exception thrown is not appropriate.
org.apache.eventmesh.common.loadbalance.WeightRandomLoadBalanceSelectorTest
[bug]: Map
addressToNum
is the result of weighted random selection for 100000 times. Key is a address and value is times. The weight of "192.168.0.3":"192.168.0.2":"192.168.0.1" is 4:2:1. SoaddressToNum.get("192.168.0.3")
should ≈addressToNum.get("192.168.0.2") * 2
.Three cases, pairwise verification should be conducted, otherwise the verification is insufficient.
In java 9 and later version, Reflection access private field is regard as illegal reflective access operation. It cause warning, even exception according to VM options.
org.apache.eventmesh.common.loadbalance.WeightRoundRobinLoadBalanceSelectorTest
It is not accurate for verify the weight in WeightRoundRobin.
The capacity of Map in
#testSelect()
is definite.Describe the solution you'd like
org.apache.eventmesh.common.loadbalance.RandomLoadBalanceSelectorTest
Use
Assert.fail()
org.apache.eventmesh.common.loadbalance.WeightRandomLoadBalanceSelectorTest
[bug]: Set the error rate to 0.05 instead of 5000(=100000/20).
Verify the ratio of "192.168.0.2" : "192.168.0.1"
User getter access private field.
org.apache.eventmesh.common.loadbalance.WeightRoundRobinLoadBalanceSelectorTest
Use
Assert.assertEquals(excepted, actual, delta)
Init map with a specified capacity.
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: