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

Reset timeout to initial value #1739

Merged
merged 1 commit into from
Dec 19, 2018
Merged

Conversation

sazzad16
Copy link
Collaborator

@sazzad16 sazzad16 commented Jan 13, 2018

In two test methods, Redis config is changed but is not reset to initial value. Because of this, redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream. occurs time to time in tests. This PR will resolve this issue.

This is apparently the most probable casue of issue that tempted the fix redis#1718.
@sazzad16 sazzad16 added this to the 2.9.1 milestone Jan 13, 2018
@sazzad16
Copy link
Collaborator Author

@HeartSaVioR @marcosnils Please review this. Once timeout is set to 1 second, tests with 1+ seconds of sleep are tend to fail. Resetting timeout should resolve this issue.

@sazzad16
Copy link
Collaborator Author

@marcosnils @gkorland Please review this.

@gkorland gkorland modified the milestones: 2.9.1, 3.1.0 Dec 6, 2018
@sazzad16 sazzad16 modified the milestones: 3.1.0, 3.0.1 Dec 6, 2018
jedis.close();

// reset config
jedis = new Jedis("localhost", 6379);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be in a try-finally block

jedis.close();

// reset config
jedis = new Jedis(new URI("redis://:foobared@localhost:6380/2"));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be in a try-finally block

@sazzad16
Copy link
Collaborator Author

@gkorland Just being lazy, but I think we can use try-finally in entire project in separate PR.

@marcosnils
Copy link
Contributor

Just being lazy, but I think we can use try-finally in entire project in separate PR.

LGTM!.

Good catch @sazzad16

@sazzad16 sazzad16 merged commit 3e348da into redis:master Dec 19, 2018
@sazzad16 sazzad16 deleted the reset-configSet branch January 5, 2019 01:20
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.

None yet

3 participants