-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
junitrunner: Report suppressed and ignored tests as skipped. #13717
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
e873a47
to
91e8a87
Compare
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
91e8a87
to
61158a5
Compare
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
61158a5
to
ef8b27c
Compare
TestSuiteNode parent = createTestSuite(); | ||
TestCaseNode skipped = createTestCase(parent); | ||
skipped.started(testInstant(Instant.ofEpochMilli(1))); | ||
skipped.testSkipped(testInstant(Instant.ofEpochMilli(2))); | ||
TestCaseNode suppressed = createTestCase(parent); | ||
suppressed.testSuppressed(testInstant(Instant.ofEpochMilli(4))); | ||
resultWriter.writeTestSuites(writer, root.getResult()); | ||
Document document = parseXml(stringWriter.toString()); | ||
NodeList caseElems = document.getElementsByTagName("testcase"); | ||
assertThat(caseElems.getLength()).isEqualTo(2); | ||
for (int i = 0; i < 2; i++) { | ||
Element caseElem = (Element) caseElems.item(i); | ||
NodeList skippedElems = caseElem.getElementsByTagName("skipped"); | ||
System.out.println(stringWriter.toString()); | ||
assertThat(skippedElems.getLength()).isEqualTo(1); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please break the test into three blocks: arrange (setting things up), act (running), assert (verifying results). Separate each block with an empty line.
Remove System.out.println.
Fixes bazelbuild#6688 (after java tools release)
ef8b27c
to
0609ee4
Compare
YEY! :) ❤️ |
@bazel-io flag |
Eh, wait. This should already be in Bazel 5. |
@bazel-io fork 5.3.0 |
@Yannic Yes, this change is already present. Closing the forked issue. Thanks! |
Fixes #6688
(after java tools release)