-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(sql): Test fix for incorrect running instances count in process … #4752
base: master
Are you sure you want to change the base?
Conversation
2151b08
to
df28120
Compare
Reviewer HintsAdded a test which verifies the correctness of statistics for the issue reproduction case
|
@@ -101,7 +101,6 @@ | |||
( | |||
select | |||
I.PROC_DEF_ID_ | |||
, I.INCIDENT_TYPE_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context: Incident type is removed from the query's select, group by
@@ -392,4 +393,73 @@ public void shouldSortResult() { | |||
verifyOrderedResult("incidents", "asc", Arrays.asList("p2", "B", "p1", "A")); | |||
verifyOrderedResult("incidents", "desc", Arrays.asList("A", "p1", "B", "p2")); | |||
} | |||
|
|||
@Test | |||
public void shouldReturnCorrectStatistics() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context: Test that covers the correct statistics calculation for process instances with incidents (different types)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Verified that test would fail without the included query changes.
Really well written test case!
Context: The query
selectPDStatistics
calculates the total processInstances wrong.Used-by:
ProcessDefinitionRestService#getStatisticsCount
Why: The group by
incidentType
part of the query should not be used for counting the total process instances.Tests: The commit adds a test which expects the correct statistics returned when process instances related to incidents with different types are used.
Related-to: https://jira.camunda.com/browse/SUPPORT-24279
#4756