You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/12/18 14:29:00 UTC
[jira] [Created] (HDDS-9951) Improve assertTrue(String.contains(...)) assertions
Attila Doroszlai created HDDS-9951:
--------------------------------------
Summary: Improve assertTrue(String.contains(...)) assertions
Key: HDDS-9951
URL: https://issues.apache.org/jira/browse/HDDS-9951
Project: Apache Ozone
Issue Type: Improvement
Components: test
Reporter: Attila Doroszlai
Assertions in the form:
{code}
assertTrue(<string>.contains(...))
{code}
do not provide any information about the actual value, if the assertion fails.
{code}
AssertionFailedError: expected: <true> but was: <false>
{code}
This can be improved by replacing them with:
{code}
import static org.assertj.core.api.Assertions.assertThat;
assertThat(<string>).contains(...)
{code}
which gives us more info in the form:
{code}
AssertionError:
Expecting:
<"actual string">
to contain:
<"part">
{code}
The goal of this task is to find and replace such {{assertTrue}} assertions.
It can be divided into subtasks, by one or more modules, to avoid too big changes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org