webdev icon indicating copy to clipboard operation
webdev copied to clipboard

Fix flaky / breaking CI tests

Open elliette opened this issue 3 years ago • 1 comments

Our CI tests keep breaking. The OS / SDK version changes, but all the tests appear to be failing due to unresolved file paths, eg:

  Invalid argument (uri): Unknown library: "file:///D:/a/webdev/webdev/fixtures/fixtures/_test/lib/library.dart"
  package:dwds/src/utilities/dart_uri.dart 84:5      new DartUri._fromFileUri
  package:dwds/src/utilities/dart_uri.dart 41:22     new DartUri
  ..\..\dwds\test\dart_uri_file_uri_test.dart 89:31  main.<fn>.<fn>.<fn>

I think there are a few (potential) issues:

  1. Some of our tests (for example, instance_test) are using packages outside of the test /fixtures/... directory as the test directory. I think we should only be using directories within /fixtures/... as our test directories.
  2. We are treating the default TestContext directory as a relative directory from the current path. However, we are not doing the same for a directory that is passed in as a parameter (we assume that it is an absolute directory, although none of them are actually absolute. See for example dart_uri_file_uri_test)

elliette avatar Dec 19 '22 22:12 elliette

Still running into file path issues, re-opening.

elliette avatar Dec 20 '22 20:12 elliette