Title: Timeout does not cause exception / error escalation · Issue #129 · utPLSQL/utPLSQL-cli · GitHub
Open Graph Title: Timeout does not cause exception / error escalation · Issue #129 · utPLSQL/utPLSQL-cli
X Title: Timeout does not cause exception / error escalation · Issue #129 · utPLSQL/utPLSQL-cli
Description: The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty - so correct me if I'm wrong, but from your c...
Open Graph Description: The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty - so ...
X Description: The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty -...
Opengraph URL: https://github.com/utPLSQL/utPLSQL-cli/issues/129
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Timeout does not cause exception / error escalation","articleBody":"The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty - so correct me if I'm wrong, but from [your code](https://github.com/utPLSQL/utPLSQL-cli/blob/develop/src/main/java/org/utplsql/cli/RunCommand.java) (lines 203-209) I understand you're using java.util.concurrent.ExecutorService.shutdown() which causes an **orderly shutdown** and after that in line 209 you return 'returnCode[0]' which I suppose is initialized to **literally zero** as well. Therefore an invoking process **does not get notified, that an irregular termination (due to a timeout) occurred**, which makes error handling cumbersome. IMHO a timeout should push an error/exception up the call-stack.\r\n\r\n...and here's a suggestion, how this issue might get resolved. Take it with a grain of salt, as I'm not a Java expert though...\r\nI think the solution is using the return Value of the awaitTermination Method to determine the returnValue of your own function, like ...\r\n\r\n```\r\nif (!executorService.awaitTermination(timeoutInMinutes, TimeUnit.MINUTES)) {\r\n returnCode[0] = 1; // or whatever exitcode you might assign a timeout - except zero!\r\n}\r\n```\r\nAccording to the API doc awaitTermination() returns true if this executor terminated and false if the timeout elapsed before termination.","author":{"url":"https://github.com/c0dw","@type":"Person","name":"c0dw"},"datePublished":"2019-02-19T08:08:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/129/utPLSQL-cli/issues/129"}
| 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:2e3edfc4-3a91-c3d3-069d-181f2f9c3379 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A53C:1FEF54:2DE32D8:3CB0A64:696DB1F6 |
| html-safe-nonce | cfbe88a5d96f1ada243c051c9010b7990219241614790bbff1adb30d81df8bbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTNDOjFGRUY1NDoyREUzMkQ4OjNDQjBBNjQ6Njk2REIxRjYiLCJ2aXNpdG9yX2lkIjoiODk2MDQ3MDY5MDkzNDE0MTQzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9ecb431750b7b60fbc9e0b6726ce42941775e944bc7a9cb7b18f3e07baf02f84 |
| hovercard-subject-tag | issue:411794827 |
| 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/utPLSQL/utPLSQL-cli/129/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d6e3221abdc59e0af83802bc87536b9826e7f80d0aa6b6952c3d5b56509260d6/utPLSQL/utPLSQL-cli/issues/129 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d6e3221abdc59e0af83802bc87536b9826e7f80d0aa6b6952c3d5b56509260d6/utPLSQL/utPLSQL-cli/issues/129 |
| og:image:alt | The timeout implemented in RunCommand.java does not trigger a proper error escalation. I still don't get an exitcode after a timeout in the onvoking process. My java skills are slightly rusty - so ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | c0dw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/utPLSQL/utPLSQL-cli git https://github.com/utPLSQL/utPLSQL-cli.git |
| octolytics-dimension-user_id | 15661281 |
| octolytics-dimension-user_login | utPLSQL |
| octolytics-dimension-repository_id | 88671831 |
| octolytics-dimension-repository_nwo | utPLSQL/utPLSQL-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 88671831 |
| octolytics-dimension-repository_network_root_nwo | utPLSQL/utPLSQL-cli |
| 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 | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width