-
-
Notifications
You must be signed in to change notification settings - Fork 50
Pull forward test changes #3727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # Tests/AppTests/AllTests.swift
# Conflicts: # Tests/AppTests/Helpers/TestSupport.swift
import Dependencies | ||
|
||
|
||
@Suite(.dependency(\.date.now, .t0)) struct AllTests { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to be able to bring up a number of test dbs at the start of the app tests and tear them down afterwards, all the tests need to belong to a single suite. The easiest way to do this is to nest all existing tests under a new top level suite.
This suite will then later gain the trait
- @Suite(.dependency(\.date.now, .t0)) struct AllTests { }
+ @Suite(.setupDatabasePool, .dependency(\.date.now, .t0)) struct AllTests { }
NB: AllTests
isn't an ideal name I've just realised, because we have a couple of other test suites that aren't nested. I'll rename this to AllAppTests
after all is done. It'd be too much rebasing for little gain at this point.
@Suite struct AnalyzeErrorTests { | ||
let socialPosts = LockIsolated<[String]>([]) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the nested @Suite
s can't be defined in AllTests.swift
, because they hold properties (which can't be declared in extensions).
@Suite | ||
|
||
|
||
struct LiveGitlabBuilderTests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change, just pulling it into its own file.
This pull forward changes required to parallelise tests. The point here is to reduce the noise of that PR with things that aren't required but can already be applied ahead of time.