daml icon indicating copy to clipboard operation
daml copied to clipboard

Improve test logging for Upgrades tests on CantonFixture

Open dylant-da opened this issue 1 year ago • 0 comments
trafficstars

Testing for participant upload-time upgradeability checks in UpgradeSpec.scala will persist the entire Canton log on Linux and Mac while running a test. In the event of a failure, they will print the entire log while looking for a matching regex.

We can improve this:

  • On windows we don't try to remove the file because of Windows file locking behaviour, which may leave these files around during the CI run, which could get expensive - I would at least like to enable removal on Linux/MacOS.
  • We could track the subset of the file we care about and only print that, i.e. take the length before the test and remove that from the start
  • We'd save the canton log (from our single canton instance) as an artifact on the CI job - A check on the presence/abscence of the env var CI should allow us to work out if we need to persist canton logging as a CI artifact.

dylant-da avatar Feb 15 '24 10:02 dylant-da