Title: Bad results for failing standalone expectations on compound data · Issue #998 · utPLSQL/utPLSQL · GitHub
Open Graph Title: Bad results for failing standalone expectations on compound data · Issue #998 · utPLSQL/utPLSQL
X Title: Bad results for failing standalone expectations on compound data · Issue #998 · utPLSQL/utPLSQL
Description: Describe the bug When running standalone expectations in a single session and having more than one failing expectation, the results returned by report are wrong. This is probably also observable in regular run,when running more than one ...
Open Graph Description: Describe the bug When running standalone expectations in a single session and having more than one failing expectation, the results returned by report are wrong. This is probably also observable in...
X Description: Describe the bug When running standalone expectations in a single session and having more than one failing expectation, the results returned by report are wrong. This is probably also observable in...
Opengraph URL: https://github.com/utPLSQL/utPLSQL/issues/998
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bad results for failing standalone expectations on compound data ","articleBody":"**Describe the bug**\r\nWhen running standalone expectations in a single session and having more than one failing expectation, the results returned by report are wrong.\r\nThis is probably also observable in regular run,when running more than one cursor/object comparison in single test.\r\n\r\n\r\n**Provide version info**\r\nutPLSQL v3.1.8\r\n\r\n**To Reproduce**\r\n```sql\r\nclear screen\r\nset serverout on\r\ndeclare\r\n l_actual sys_refcursor;\r\n l_expected sys_refcursor;\r\nbegin\r\n open l_actual for select rownum rn from dual connect by level \u003c 5;\r\n open l_expected for select rownum rn from dual connect by level = 1;\r\n ut.expect(l_actual).to_equal(l_expected);\r\n open l_actual for select rownum rn from dual connect by level \u003c 3;\r\n open l_expected for select * from (select rownum rn from dual connect by level \u003c 3) order by 1 desc;\r\n ut.expect(l_actual).to_equal(l_expected);\r\nend;\r\n/\r\nrollback;\r\n```\r\n\r\nThis produces output:\r\n```\r\nFAILURE\r\n Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 1 ]\r\n Diff:\r\n Rows: [ 3 differences ]\r\n Row No. 2 - Extra: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 3 - Extra: \u003cRN\u003e3\u003c/RN\u003e\r\n Row No. 4 - Extra: \u003cRN\u003e4\u003c/RN\u003e\r\n at \"anonymous block\", line 7\r\nFAILURE\r\n Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]\r\n Diff:\r\n Rows: [ 2 differences ]\r\n Row No. 1 - Actual: \u003cRN\u003e1\u003c/RN\u003e\r\n Row No. 1 - Expected: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 2 - Actual: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 2 - Expected: \u003cRN\u003e1\u003c/RN\u003e\r\n Row No. 2 - Extra: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 3 - Extra: \u003cRN\u003e3\u003c/RN\u003e\r\n Row No. 4 - Extra: \u003cRN\u003e4\u003c/RN\u003e\r\n at \"anonymous block\", line 10\r\n```\r\n\r\nHowever adding a commit or rollback in between expectations fixes the issue.\r\n\r\n```sql\r\nclear screen\r\nset serverout on\r\ndeclare\r\n l_actual sys_refcursor;\r\n l_expected sys_refcursor;\r\nbegin\r\n open l_actual for select rownum rn from dual connect by level \u003c 5;\r\n open l_expected for select rownum rn from dual connect by level = 1;\r\n ut.expect(l_actual).to_equal(l_expected);\r\n rollback;\r\n open l_actual for select rownum rn from dual connect by level \u003c 3;\r\n open l_expected for select * from (select rownum rn from dual connect by level \u003c 3) order by 1 desc;\r\n ut.expect(l_actual).to_equal(l_expected);\r\nend;\r\n/\r\nrollback;\r\n```\r\n\r\n```\r\nFAILURE\r\n Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 1 ]\r\n Diff:\r\n Rows: [ 3 differences ]\r\n Row No. 2 - Extra: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 3 - Extra: \u003cRN\u003e3\u003c/RN\u003e\r\n Row No. 4 - Extra: \u003cRN\u003e4\u003c/RN\u003e\r\n at \"anonymous block\", line 7\r\nFAILURE\r\n Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]\r\n Diff:\r\n Rows: [ 2 differences ]\r\n Row No. 1 - Actual: \u003cRN\u003e1\u003c/RN\u003e\r\n Row No. 1 - Expected: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 2 - Actual: \u003cRN\u003e2\u003c/RN\u003e\r\n Row No. 2 - Expected: \u003cRN\u003e1\u003c/RN\u003e\r\n at \"anonymous block\", line 11\r\n```\r\n\r\n**Expected behavior**\r\nDiff reports should always provide valid outputs.\r\n\r\nTo fix this, we can delete the diff table as part of diff cleanup.\r\n","author":{"url":"https://github.com/jgebal","@type":"Person","name":"jgebal"},"datePublished":"2019-09-22T10:54:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/998/utPLSQL/issues/998"}
| 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:8c3230e4-a3d0-d9b0-1b38-6c71347765e1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3CE:146AFC:7E4DDA:B1839F:6A638940 |
| html-safe-nonce | 7c407f6b619eecca93ed8fb7509aae2392c92f39191792864eead998ff74f40d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0NFOjE0NkFGQzo3RTREREE6QjE4MzlGOjZBNjM4OTQwIiwidmlzaXRvcl9pZCI6IjQ1MTE1NTMzNDU5NDY4ODAzMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e05ca7a68bd9de28a24ecd43c95f061c3bfe888e668bd110eb43e595457fd7d0 |
| hovercard-subject-tag | issue:496763294 |
| 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/998/issue_layout |
| twitter:image | https://opengraph.githubassets.com/589ee9188431a27abe08c4990f446ee214521bbcf0abd8bc16ec1d68279c38c7/utPLSQL/utPLSQL/issues/998 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/589ee9188431a27abe08c4990f446ee214521bbcf0abd8bc16ec1d68279c38c7/utPLSQL/utPLSQL/issues/998 |
| og:image:alt | Describe the bug When running standalone expectations in a single session and having more than one failing expectation, the results returned by report are wrong. This is probably also observable in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jgebal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ca676e17c4da4532dc68541e9fc874034ae840c26b5f34da7f1c42d9a600659 |
| turbo-cache-control | no-preview |
| go-import | github.com/utPLSQL/utPLSQL git https://github.com/utPLSQL/utPLSQL.git |
| octolytics-dimension-user_id | 15661281 |
| octolytics-dimension-user_login | utPLSQL |
| octolytics-dimension-repository_id | 50728220 |
| octolytics-dimension-repository_nwo | utPLSQL/utPLSQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 50728220 |
| octolytics-dimension-repository_network_root_nwo | utPLSQL/utPLSQL |
| 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 | 3a0a9f049e072eb8e5795dfddcefdba9e277501d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width