Title: Multiple time out tests are generated by fuzzer · Issue #2595 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Multiple time out tests are generated by fuzzer · Issue #2595 · UnitTestBot/UTBotJava
X Title: Multiple time out tests are generated by fuzzer · Issue #2595 · UnitTestBot/UTBotJava
Description: Description Since #2583 fuzzer is able to construct quite complex arguments for method under test, that can take quite some time to actually create, while instrumnted-process marks executions as timed out even if the thing that actually ...
Open Graph Description: Description Since #2583 fuzzer is able to construct quite complex arguments for method under test, that can take quite some time to actually create, while instrumnted-process marks executions as ti...
X Description: Description Since #2583 fuzzer is able to construct quite complex arguments for method under test, that can take quite some time to actually create, while instrumnted-process marks executions as ti...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/2595
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multiple time out tests are generated by fuzzer","articleBody":"**Description**\r\n\r\nSince #2583 fuzzer is able to construct quite complex arguments for method under test, that can take quite some time to actually create, while instrumnted-process marks executions as timed out even if the thing that actually timed out is the argument creation prior to method under test invocation.\r\n\r\n**To Reproduce**\r\n\r\n* Use UtBot version from #2583\r\n* Generate tests with fuzzing set to `100%` for the following method\r\n```java\r\npublic static boolean isNull(CharSequence charSequence) {\r\n if (charSequence == null) return true;\r\n else return false;\r\n}\r\n```\r\n\r\n**Expected behavior**\r\n\r\nTwo successful test and no time out test.\r\n\r\n**Actual behavior**\r\n\r\nTwo successful test and 10 time out test.\r\n\r\n**Visual proofs**\r\n\r\n~~~java\r\npublic final class ClassUnderTestTest {\r\n ///region Test suites for executable org.example.ClassUnderTest.isNull\r\n\r\n ///region FUZZER: SUCCESSFUL EXECUTIONS for method isNull(java.lang.CharSequence)\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = null -\u003e return true\")\r\n public void testIsNullReturnsTrue() {\r\n boolean actual = ClassUnderTest.isNull(null);\r\n\r\n assertTrue(actual);\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = '10\\uFFFC' (mutated from '10') -\u003e return false\")\r\n public void testIsNullReturnsFalseWithNonEmptyString() {\r\n boolean actual = ClassUnderTest.isNull(\"10\\uFFFC\");\r\n\r\n assertFalse(actual);\r\n }\r\n ///endregion\r\n\r\n ///region FUZZER: TIMEOUTS for method isNull(java.lang.CharSequence)\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n byte[] byteArray1 = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n inetAddress.getByAddress(byteArray1);\r\n inetAddress.getLocalHost();\r\n inetAddress.getByName(\"\");\r\n byte[] byteArray2 = {Byte.MIN_VALUE, (byte) 0, (byte) -1};\r\n inetAddress.getByAddress(\"-3\", byteArray2);\r\n inetAddress.getLoopbackAddress();\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull1() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n byte[] byteArray1 = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n inetAddress.getByAddress(byteArray1);\r\n inetAddress.getLocalHost();\r\n inetAddress.getByName(\"\");\r\n byte[] byteArray2 = {Byte.MIN_VALUE, (byte) 0, (byte) -1};\r\n inetAddress.getByAddress(\"-3\", byteArray2);\r\n inetAddress.getLoopbackAddress();\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull2() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n inetAddress.getByName(\"\");\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull3() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull4() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull5() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull6() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull7() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull8() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n\r\n /**\r\n * @utbot.classUnderTest {@link ClassUnderTest}\r\n * @utbot.methodUnderTest {@link ClassUnderTest#isNull(CharSequence)}\r\n */\r\n @Test\r\n @DisplayName(\"isNull: arg_0 = InetAddress.getCanonicalHostName()\")\r\n @Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)\r\n public void testIsNull9() throws UnknownHostException {\r\n byte[] byteArray = {Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE, Byte.MIN_VALUE};\r\n InetAddress inetAddress = getByAddress(byteArray);\r\n String charSequence = inetAddress.getCanonicalHostName();\r\n \r\n /* This execution may take longer than the 1000 ms timeout\r\n and therefore fail due to exceeding the timeout. */\r\n assertTimeoutPreemptively(Duration.ofMillis(1000L), () -\u003e ClassUnderTest.isNull(charSequence));\r\n }\r\n ///endregion\r\n\r\n ///endregion\r\n}\r\n~~~\r\n","author":{"url":"https://github.com/IlyaMuravjov","@type":"Person","name":"IlyaMuravjov"},"datePublished":"2023-09-12T19:47:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2595/UTBotJava/issues/2595"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:41026b43-f3ba-e4a9-5769-a6f494c771d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96F6:D4DD7:54F90F:74599A:698E05E5 |
| html-safe-nonce | 8255346916fff15ba0ae75bd207cad173fd93593f7cd6d38c16f6c40d6317f38 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkY2OkQ0REQ3OjU0RjkwRjo3NDU5OUE6Njk4RTA1RTUiLCJ2aXNpdG9yX2lkIjoiNDc2ODg1OTY4MjY3NTQ5MjMyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5a74be95f78593d0ced8bdbe7ef5c0bb9e2b8343ea6ede94387dee298f8128ca |
| hovercard-subject-tag | issue:1893153463 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/UnitTestBot/UTBotJava/2595/issue_layout |
| twitter:image | https://opengraph.githubassets.com/24a1fcf96a35daac1bbd58523446c44d6d0b438cc39e3c231eaa08e777d88d9b/UnitTestBot/UTBotJava/issues/2595 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/24a1fcf96a35daac1bbd58523446c44d6d0b438cc39e3c231eaa08e777d88d9b/UnitTestBot/UTBotJava/issues/2595 |
| og:image:alt | Description Since #2583 fuzzer is able to construct quite complex arguments for method under test, that can take quite some time to actually create, while instrumnted-process marks executions as ti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | IlyaMuravjov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 70a88bfe6d9639434ae7f5a46d15c336b8884978a51526bc55fc57d848f1e3c1 |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2519b16db5550494a653f9a8837c14ef7df80804 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width