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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:96bf64bc-7169-cfce-7ff0-4ad22355436b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA26:8D4A2:7956E0:9CD18D:698FB8D5 |
| html-safe-nonce | 73094e119b8af3c975d1c1f60a17ece94690ee1f34c1acccef6e5d3217df8678 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTI2OjhENEEyOjc5NTZFMDo5Q0QxOEQ6Njk4RkI4RDUiLCJ2aXNpdG9yX2lkIjoiMjM1Njc0ODAxNTY0MzkwMDExNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 70f9c7c55e7dec2a398b4b1f4b7427ed06a53a0a5fc559371e03d72a772fe9e6 |
| hovercard-subject-tag | pull_request:1000815425 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4084c47bba08e7ba5fab63cb1dd485a339910ed7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width