Skip to content

ARTEMIS-1924 small tweaks on HeartBeat test#2152

Merged
asfgit merged 1 commit into
apache:masterfrom
clebertsuconic:ARTEMIS-1924
Jun 20, 2018
Merged

ARTEMIS-1924 small tweaks on HeartBeat test#2152
asfgit merged 1 commit into
apache:masterfrom
clebertsuconic:ARTEMIS-1924

Conversation

@clebertsuconic

Copy link
Copy Markdown
Contributor

No description provided.

@clebertsuconic

Copy link
Copy Markdown
Contributor Author

@gemmellr / @mtaylor can you review this?


public static void main(String[] arg) {
if (arg.length > 0 && arg[0].equals("testConnectionReset")) {
if (arg.length > 0 && arg[0].startsWith("testCloseConsumerOnConnectionReset")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about using the argument as the queue name? That way you dont need a constant, and there are side benefits such as test isolation and if things to wonky you can read the logs and immediately know what test the output came from etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was going to do that, but then the argument was: testCloseConsumerOnConnectionResetuseOverride=true

The test is using parameters.. which I didn't like as the name of the queue...

I would prefer leaving it as is...

@gemmellr

Copy link
Copy Markdown
Member

Looks good

@clebertsuconic

Copy link
Copy Markdown
Contributor Author

@gemmellr thanks.. I will merge it then

@gemmellr

Copy link
Copy Markdown
Member

(I still don't think it should be in that class though per #2149 comments...but the test itself looks good now)

@clebertsuconic

Copy link
Copy Markdown
Contributor Author

@gemmellr that I disagree with.. this is about no heart beat.. and disconnecting the client.

@gemmellr

Copy link
Copy Markdown
Member

To me it seemed more about cleaning up the client regardless of idle-timeout, and that it should do exactly the same if idle-timeout handling is enabled or if it wasn't using AMQP at all.

@clebertsuconic

Copy link
Copy Markdown
Contributor Author

@gemmellr the issue i was dealing with was a .NET client in windows not cleaning up after a disconnect, after I created the feature. So.. this is definitely related. We can create more tests outside of this context.. but this test is definitely needed IMO.

@asfgit
asfgit merged commit 6f72e0b into apache:master Jun 20, 2018
asfgit pushed a commit that referenced this pull request Jun 20, 2018
@clebertsuconic
clebertsuconic deleted the ARTEMIS-1924 branch June 20, 2018 15:48
@gemmellr

Copy link
Copy Markdown
Member

Yes, after a connection-reset-by-peer error which meant the broker knew the connection had gone, which it knew regardless of whether idle-timeout handling was enabled or not, but failed to clear it up at the time. I think we may need to agree to disagree here :)

@clebertsuconic

clebertsuconic commented Jun 20, 2018

Copy link
Copy Markdown
Contributor Author

with heart beats.. you won't need this test.. as ping/pongs will disconnect the client.
Disabling heart beats and still solving issues it's all that this fix was about and the reason I created these tests.

@clebertsuconic

Copy link
Copy Markdown
Contributor Author

It's pointless to argue anyway.. it's just a test and it's working as expected... I need to move to a different task ;)

@gemmellr

Copy link
Copy Markdown
Member

with heart beats.. you won't this test.. as ping/pongs will disconnect the client.

The idle-timeout stuff defaults to killing after 60 seconds, which the test doesnt even allow for running long enough to occur, so disabling heartbeats should make no difference to the test, which is why I dont think it should be in this class. But I agree, lets move on.

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.

3 participants