-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add balancing test with discovery and connections #387
base: master
Are you sure you want to change the base?
Conversation
aeeddd9
to
7f9bdf4
Compare
7f9bdf4
to
87468f9
Compare
"cartridge.admin_edit_topology({ replicasets = replicasets }) ").join(); | ||
|
||
// wait until discovery get topology | ||
Thread.sleep(5_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems highly unstable on different machines. Please use polling (until the cluster gets the proper state) over sleeping.
assertEquals(Arrays.asList(4, 5), getCallCountersPerConnection(getAllConnectionCalls, router)); | ||
} | ||
|
||
Object routerCallCounterPerConnection = getCallCountersPerConnection(getAllConnectionCalls, routerClient4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: Why is it a raw Object
?
assertEquals(Arrays.asList(6, 7), getCallCountersPerConnection(getAllConnectionCalls, router)); | ||
} | ||
|
||
startCartridge(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this call do?
|
||
@NotNull | ||
private static Object getCallCountersPerConnection(String getAllConnectionCalls, TarantoolClient router) { | ||
List<?> luaResponse = router.eval(getAllConnectionCalls).join(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't it a call
or better callForSingleResult/callForMultiResult
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are showing the readers/users a bad code that they will copy to their projects
Also we could add parallel round-robin test |
9c4d441
to
c3a874c
Compare
Blocked by #400 |
367fe33
to
f2c5fc3
Compare
I haven't forgotten about:
Related issues: