The first run of any new branch will not find a corresponding tests.csv
and will return 404 not found which is fine. We do not need to display
the callstack at warning level.
* TM-51 Prep for reading and writing test results to artifactory.
* TM-51 Tests from target branch if no tests for current branch
* TM-51 Placeholder for test averaging over runs.
* TM-51 Replace slashes in branch names used as tags.
* TM-51 More placeholder work for the mean duration work.
* TM-51 Write out average tests results as as csv.
The csv file should grow and be updated on each run. This includes whether or not we are running unit tests, integration tests and so on.
* TM-51 Comment out old junit test archiving, add more comments.
* TM-51 Zip task needs to depend on a csv creation task.
If there isn't a csv file present, then the zip task doesn't run due to 'NO-SOURCE'
* TM-51 Zip task should ignore empty dirs
* TM-51 Fix up loading of test results.
We were looking for the wrong artifact name.
Add a bit more logging.
* TM-51 Fix up possible problem with allocating by class distribution.
If we encounter a class we haven't seen before, there won't be any tests.
This means we should give it some weight. '1' is far too small.
* TM-51 Test that we are definitely increment the run count.
Tracking down whether the zipped csv file should have incremented.
* TM-51 Better default value for missing test/class names.
Begin by using mean unit test duration, but we have the option to bump
that to the mean class unit tests duration.
* TM-51 More debug information around csv writing.
We should be incrementing the tests.
* TM-51 Reload the csv before updating it.
* TM-51 Reduce verbosity of logging.
* TM-51 Reinstate unit tests. Remove logging verbosity.
* TM-51 Load tests from artifactory in memory and avoid interim file.
* TM-51 Better handling of zero duration tests.
Ensure we return zero times from junit artifacts which may either be zero or have no recorded time. Before writing the tests duration csv file, store those with a known time, and then store those with zero using the average time.
* TM-51 Log whether we have recorded a test.
Tracking down the curious case where we seem to not be rerunning the
same set of tests on the second run.
* TM-51 Capture junit files as well.
Trying to track down whether some tests are intermittently run.
* TM-51 Change task dependencies to ensure ziptask is triggered.
* TM-51 Remove test assertion, and trigger build
* TM-51 Add corda/enterprise to artifactory tag name.
Moved properties to own file.
* TM-51 Remove unnecessary mean class-based duration.
* TM-51 Add more BucketingAllocator tests.
We need these to nail down its behaviour some more.
* TM-51 Further log information.
We don't seem to be finding the tests in the 'production' runs which is odd.
* TM-51 corda type double set?
* TM-51 do not set the project type in the properties.
SRP and all that.
* TM-51 better plan reporting
* TM-51 duration may be zero
Another runtime problem that doesn't show in tests.
* TM-51 better plan reporting
* fix missing space after image id
* fix merge issue in DistributedTesting
* TM-51 remove unused code when GET/PUT-ting to Artifactory.
* TM-51 put tasks in gradle group and tidy up zip task creation
* TM-51 Fix the junit XML path.
* TM-51 Fix the task graph
* TM-51 Less logging
Reapply change that was lost during merge - Adjust resolution of byteman jar to use java 11 compatible mechanism. - a1077092
Manual cherry pick of these changes (a1077092 + 3fafbe55)
Byteman is absent for most of the integration tests and long stacktrace is seen in the log
presently that un-necessarily attracts attention and consumes logging space.
(cherry picked from commit 2b6e59e7bd)
- Port ledger integrity work to `SingleThreadedStateMachineManager`
- Fix `StatemachineErrorHandlingTest`
- Fix compile errors in `RetryFlowMockTest` + `VaultObserverExceptionTest`
- Add method to `StaffedFlowHospital` that was missed during original merge
* CORDA-3194 Do not allow killed flows back into the hospital
This change has been made to prevent killed flows from being added back
to the hospital after being forcibly removed by `killFlow`. Not doing so,
could leave references to a flow inside of the hospital, which is not
the correct behaviour.
`killFlow` now sets a flow's `StatemachineState.isRemoved` to true.
This check is then used in `StaffedFlowHospital` and the
`DumpHistoryOnErrorInterceptor`.
* CORDA-3194 Log different message for transition error due to killed flow
When a flow is killed, its checkpoint is deleted. Currently, the
statemachine will still try a process the next event even if it has
been killed. This can lead to an error when trying to update the
deleted checkpoint. The exception thrown from this is logged out.
An if statement has been added to log a different message at debug level
if it is due to an update error for a killed flow. This is done to not
alarm node operators of the exception.
* CORDA-3194 Relax duplicate insert flow hospital handling
Revert a previous change to now make the duplicate insert staff member to
give a diagnosis of discharge or not my speciality (previously gave
terminal).
This is to prevent duplicate insert handling from overriding finality
flow error handling.
* added the warning as a TimerTask at StaffedFlowHospital#delayedDischargeTimer
* moved the scheduling of the warning task at StaffedFlowHospital#init block. That way we ensure that the task will be scheduled only once at StaffedFlowHospital initialization.
* Corrected overnight observation warning task's logging message. Changed StaffedFlowHospital#delayedDischargeTimer to the more generic StaffedFlowHospital#hospitalJobTimer since it now schedules delayed discharges tasks as well the overnight observation warning task. Removed this from property reference
* switching to fun timerTask for the instantiation of anonymous TimerTask classes
* Correct condition to log patients who are currently in the hospital, whose last record in their medical records is Outcome.OVERNIGHT_OBSERVATION. Extended logging to include treatableSessionInits staying in the hospital
* Add not empty check for patientsUnderOvernightObservation. Correct strings.
When a flow fails to retry, it should be kept in for overnight observation and aborted.
In the future, it might be possible to retry flows again that failed during their retry, but for now keeping for observation and aborting is satisfactory.
* CORDA-3194 Remove hospitalised flows from `HospitalisingInterceptor`
Small refactor to remove some of the hospital logic out of the
`HospitalisingInterceptor` and into the `StaffedFlowHospital`.
Add some comments to help clarify the purpose of the two maps inside
of the hospital.
* CORDA-3194 When a flow fails to retry force it into observation
When a flow fails to retry, it should be kept in for overnight
observation and aborted.
In the future, it might be possible to retry flows again that failed
during their retry, but for now keeping for observation and aborting is
satisfactory.
* CORDA-3194 Test for database commit failure when retrying a flow
Failing during the database commit failure that occurs after the retry
flow action does not stop the flow from actually retrying. This test
confirms this functionality.
The retried flow gets scheduled as part of the retry action. The failure
in the commit action does not prevent this since it has already been
scheduled.