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

Fixed issue with overwriting FailureConfig on settings other configs #1127

Merged
merged 1 commit into from Feb 5, 2019

Conversation

viclovsky
Copy link
Contributor

@viclovsky viclovsky commented Feb 4, 2019

Hi!
I set custom FailureConfig(#1094), but it was overwritten (created new one) on adding other configs.
See an example below.
...failureConfig(FailureConfig.failureConfig().failureListeners(new MyFailureListener()))).logConfig(getLogConfig())...
There will be an empty FailureConfig config with default listener when we use similar chain of calles cause it was recreated.

@viclovsky
Copy link
Contributor Author

I just have found another issue
This one works:
given().config(RestAssuredConfig.config().failureConfig(failureConfig)) .get("http://jsonplaceholder.typicode.com/todos/1").then().statusCode(400);

But this one — doesn't :

given().config(RestAssuredConfig.config().failureConfig(failureConfig))
.get("http://jsonplaceholder.typicode.com/todos/1").then().spec(new ResponseSpecBuilder().expectStatusCode(400).build());

@johanhaleby
Copy link
Collaborator

Oh well spotted! Thanks a lot!

@johanhaleby johanhaleby merged commit f70eb42 into rest-assured:master Feb 5, 2019
@johanhaleby
Copy link
Collaborator

Regarding the second issue, is that resolved with this PR as well?

@viclovsky
Copy link
Contributor Author

Regarding the second issue, is that resolved with this PR as well?

Second issue hasn't been fixed. I'll create another issue ticket

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

2 participants