Title: Try another approach to mark hanging generated tests #371 by Vassiliy-Kudryashov · Pull Request #554 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Try another approach to mark hanging generated tests #371 by Vassiliy-Kudryashov · Pull Request #554 · UnitTestBot/UTBotJava
X Title: Try another approach to mark hanging generated tests #371 by Vassiliy-Kudryashov · Pull Request #554 · UnitTestBot/UTBotJava
Description: Description Note, this issue affects JUnit 5 only! New methods and entities were added to codegen to provide required assertion wrapper. Now tests with timeout are being abrupt just after exceeding time limit. Fixes #371 Type of Change Please delete options that are not relevant. New feature (non-breaking change which adds functionality) How Has This Been Tested? Manual Scenario Set handing test timeout to 100ms and generate tests for the example: package issue371; import java.io.File; public class PomXmlFinder { public static void main(String[] args) { scan(new File("C:\\")); } private static int counter = 0; private static void scan(File file) { if (counter > 10) return; if (file.isFile() && file.getName().equals("pom.xml")) { counter++; if (counter > 10) return; System.out.println(file.getAbsolutePath()); } File[] files = file.listFiles(); if (files != null) { for (File child : files) { scan(child); } } } } Generated test methods should be not only annotated with @Timeout tag but also have wrappers like assertTimeoutPreemptively(Duration.ofMillis(100L), () -> PomXmlFinder.main(stringArray)); inside Checklist (remove irrelevant options): The change followed the style guidelines of the UTBot project Self-review of the code is passed No new warnings
Open Graph Description: Description Note, this issue affects JUnit 5 only! New methods and entities were added to codegen to provide required assertion wrapper. Now tests with timeout are being abrupt just after exceeding...
X Description: Description Note, this issue affects JUnit 5 only! New methods and entities were added to codegen to provide required assertion wrapper. Now tests with timeout are being abrupt just after exceeding...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/554
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:442a41b4-4d9e-2cf7-6874-c8b40a90063d |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | AEBA:1B7BE8:151907A:1B3B3B6:698FE626 |
| html-safe-nonce | 1b38689a3bb857620e7c68c082c9dc72a788337cc6ab85ee2744e60f4516dee4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUJBOjFCN0JFODoxNTE5MDdBOjFCM0IzQjY6Njk4RkU2MjYiLCJ2aXNpdG9yX2lkIjoiNzMyMjI2MTIzOTU3NjM4OTE1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7036d5ea86527cce1923de4f4dca58612f3e041f872ccdef13a5c2d85a4dbcf9 |
| hovercard-subject-tag | pull_request:1000815425 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/UnitTestBot/UTBotJava/pull/554/checks |
| twitter:image | https://avatars.githubusercontent.com/u/4101410?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4101410?s=400&v=4 |
| og:image:alt | Description Note, this issue affects JUnit 5 only! New methods and entities were added to codegen to provide required assertion wrapper. Now tests with timeout are being abrupt just after exceeding... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width