Amelchev Nikita created IGNITE-10023:
----------------------------------------
Summary: Improve ListeningTestLogger for wait conditions.
Key: IGNITE-10023
URL:
https://issues.apache.org/jira/browse/IGNITE-10023 Project: Ignite
Issue Type: Improvement
Reporter: Amelchev Nikita
Assignee: Amelchev Nikita
Fix For: 2.8
[Dev-list discussion.|
http://apache-ignite-developers.2346864.n4.nabble.com/Unreliable-checks-in-tests-for-string-presence-in-GridStringLogger-contents-td30802.html]
Method LogListener.check() should be boolean type.
It'll be useful for wait for conditions and code readability:
For now:
{code:java}
waitForCondition(() -> {
try {
lsnr.check();
return true;
}
catch (AssertionError ignored) {
return false;
}
}, timeout);
{code}
After improvement:
{code:java}
waitForCondition(lsnr::check, timeout);
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)