RuntimeTools / SwiftMetrics

Swift Application Metrics instruments the Swift runtime for performance monitoring, providing the monitoring data programatically via an API or visually with an Eclipse Client.
https://developer.ibm.com/swift/monitoring-diagnostics/application-metrics-for-swift/
Other
154 stars 49 forks source link

Investigate failing tests (Lifecycle) #190

Closed sjanuary closed 6 years ago

sjanuary commented 6 years ago

SwiftMetrics Travis build started failing intermittently recently with the Lifecycle test, Mac only. Investigate the underlying issue.

jonathan-spruce commented 6 years ago

So after testing, this issue was resolved by ensuring that the core tests run before the REST tests.

There was some very strange behavior with this, as even having an almost empty test file with a single test case which passes straight away in the REST file caused the Core tests to intermittently fail. I also noticed that the anonymous functions used within the test cases to handle the metrics were still being called well after the test cases had finished execution, so I believe there is potentially an issue with the tear down between tests.

As the tests were intermittently failing and only on Mac, and there are not any issues when you actually run the application, this fix is sufficient for now as it allows the tests to consistently pass again.