Skip to content
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

[1145] Use the objectsToString() method to covert failure messages to… #1146

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

jamezp
Copy link
Contributor

@jamezp jamezp commented Apr 7, 2023

… a string rather than using toString() on the object array.

resolves #1145

I don't know if this is the correct branch. If not please let me know and I can migrate it elsewhere.

@spericas
Copy link
Contributor

@alwin-joseph Could you take a look at this one?

@alwin-joseph
Copy link
Contributor

Since we are considering a patch release 3.1.3-1 of the TCK with added LICENCE in jar file (#1142) , is it ok to have this change included in the same ?

@mkarg @jansupol @spericas

Otherwise this change looks fine to me.

@alwin-joseph
Copy link
Contributor

I believe this change qualifies as "ehancement" as per https://jakarta.ee/committees/specification/tckprocess/.

Requests for improvement to tests MUST simply be created as issues with a label of enhancement in the specification project’s TCK issue tracker.

Hopefully this can be included in the next service release as the tests are not amended here.

@jamezp
Copy link
Contributor Author

jamezp commented Jul 27, 2023

I believe this change qualifies as "ehancement" as per https://jakarta.ee/committees/specification/tckprocess/.

Requests for improvement to tests MUST simply be created as issues with a label of enhancement in the specification project’s TCK issue tracker.

Hopefully this can be included in the next service release as the tests are not amended here.

I'd actually disagree and consider it a bug. Right now the failure message looks something like:

[Ljava.lang.Object;@7de4bd8f ==> expected: <true> but was: <false>

This simply converts the object array into a readable string which seems to be the original intention and was just missed. The objectsToString() method was already there and the client is just invoking Object[].toString() which isn't useful.

@jansupol
Copy link
Contributor

I'd actually disagree and consider it a bug.

if it were qualified as a bug, an exclusion would need to be created with a description of why it makes the test fail. Considering it an enhancement request, the process would be much easier, just merge the PR and have it nicely in the next release. No?

@jamezp
Copy link
Contributor Author

jamezp commented Jul 27, 2023

if it were qualified as a bug, an exclusion would need to be created with a description of why it makes the test fail. Considering it an enhancement request, the process would be much easier, just merge the PR and have it nicely in the next release. No?

I guess it depends on how you look at it. The failure message is really not useful at all which IMO is a bug. The test itself is not wrong, it's just the generated message is useless. I'm fine with having this fixed in 4.0, we're past 3.1 at this point for the most part :)

@alwin-joseph
Copy link
Contributor

If you agree we can redirect this change to master branch for 4.0 release then.

@jamezp jamezp changed the base branch from release-3.1.x to release-4.0 July 28, 2023 15:45
@jamezp
Copy link
Contributor Author

jamezp commented Jul 28, 2023

@alwin-joseph Sure thing, I just changed the branch to release-4.0.

@jamezp jamezp force-pushed the fix-assertionn-messages branch from 32cb00d to c899943 Compare July 28, 2023 15:47
… a string rather than using toString() on the object array.

Signed-off-by: James R. Perkins <jperkins@redhat.com>
@jamezp jamezp force-pushed the fix-assertionn-messages branch from c899943 to 762fc55 Compare July 28, 2023 15:48
@spericas spericas self-requested a review August 9, 2023 13:52
Copy link
Contributor

@spericas spericas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jamezp
Copy link
Contributor Author

jamezp commented Oct 9, 2023

Can this be merged or do we need some changes? The messages printed from the TCK aren't much good. You've got to debug a TCK test to see what the message is. For example:

assertNotNull(holder.get(), "Message not received, reconnect was done",
    cnt - 1, "times.");

Prints the following without the change:

[ERROR]   JAXRSClientIT.connectionLostFor1500msTest:591->JAXRSCommonClient.assertNotNull:768 [Ljava.lang.Object;@4674d90 ==> expected: <true> but was: <false>

The message is fairly useless.

@alwin-joseph
Copy link
Contributor

Based on the previous discussion this is considered for 4.0 release.
+1 for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants