SW-426: while investigating the RT bug as reported in SW-426 we found multiple...
SW-426: while investigating the RT bug as reported in SW-426 we found multiple issues with claims/tasks and their conflict/approved status. Made multiple tests to address the issue. This commit just proves the issues, a next commit contains the solutions.
endtime=task_low['starttime'])# yes, the endtime is set to the starttime
# on production the above call produce the following log line:
# 2018-06-29 09:46:16,240 ERROR Rolling back query='UPDATE resource_allocation.resource_claim SET (endtime) = (2018-06-29 11:59:17) WHERE task_id = 148052' due to error: 'duplicate key value violates unique constraint "usage_unique"
# but unfortunately this error is not reproduced here,
# the only thing we can test for is if a rollback occurs
# test if there was a log line containing the database log message for 'claim starttime >= endtime'