-
Notifications
You must be signed in to change notification settings - Fork 223
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
Stack overflow error when asserJ aspects was enabled #305
Comments
I found root cause of this, its happens after turning on aspects for assertJ. Seems like no any filtering of pointcuts for abstract-soft assertions. try this code: @Test()
public void checkSoftAssertions() {
HashMap<String, String> countriesWithCode = new HashMap<String, String>(){{
put("RU", "Russia");
}};
SoftAssertions softly = new SoftAssertions();
countriesWithCode.forEach((code, name) -> softly.assertThat(name)
.as("Country: %s - %s, should be removed from UI", code, name)
.containsIgnoringCase("Russia"));
softly.assertAll();
} |
@admizh the code you provided works fine for me. The following steps are generated: "steps": [
{
"name": "assertj$setup 'org.assertj.core.api.ProxifyMethodChangingTheObjectUnderTest@42e44f7a org.assertj.core.api.ErrorCollector@434e667b'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [],
"attachments": [],
"parameters": [],
"start": 1549984869731,
"stop": 1549984869734
},
{
"name": "as 'Country: %s - %s, should be removed from UI RU Russia'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [
{
"name": "describedAs 'Country: %s - %s, should be removed from UI RU Russia'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [],
"attachments": [],
"parameters": [],
"start": 1549984869734,
"stop": 1549984869734
}
],
"attachments": [],
"parameters": [],
"start": 1549984869734,
"stop": 1549984869735
},
{
"name": "containsIgnoringCase 'Russia'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [
{
"name": "containsIgnoringCase$accessor$21B3glwH 'Russia'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [
{
"name": "containsIgnoringCase 'Russia'",
"status": "passed",
"statusDetails": null,
"stage": "finished",
"description": null,
"descriptionHtml": null,
"steps": [],
"attachments": [],
"parameters": [],
"start": 1549984869735,
"stop": 1549984869735
}
],
"attachments": [],
"parameters": [],
"start": 1549984869735,
"stop": 1549984869735
}
],
"attachments": [],
"parameters": [],
"start": 1549984869735,
"stop": 1549984869739
}
] |
I added tests for this case and everything works as expected. Feel free to reopen issue if problem still occurs, but make sure you provided a sample project (as repository on Github) that reproduces the problem |
I'm submitting a ...
What is the current behavior?
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space, when generate report via gradle allure plugin.
Trace:
The text was updated successfully, but these errors were encountered: