File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,15 @@ class DisabledBlogTagTests: XCTestCase {
55 func testDisabledBlogTagsPath( ) throws {
66 var testWorld = try TestWorld . create ( enableTagPages: false )
77 _ = try testWorld. createTag ( " Engineering " )
8- let tagResponse = try testWorld. getResponse ( to: " /tags/Engineering " )
9- let allTagsResponse = try testWorld. getResponse ( to: " /tags " )
8+ var tagResponse : Response ? = try testWorld. getResponse ( to: " /tags/Engineering " )
9+ var allTagsResponse : Response ? = try testWorld. getResponse ( to: " /tags " )
1010
11- XCTAssertEqual ( . notFound, tagResponse. http. status)
12- XCTAssertEqual ( . notFound, allTagsResponse. http. status)
11+ XCTAssertEqual ( . notFound, tagResponse? . http. status)
12+ XCTAssertEqual ( . notFound, allTagsResponse? . http. status)
13+
14+ tagResponse = nil
15+ allTagsResponse = nil
16+
17+ XCTAssertNoThrow ( try testWorld. tryAsHardAsWeCanToShutdownApplication ( ) )
1318 }
1419}
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ struct TestWorld {
3131
3232 // To work around Vapor 3 dodgy lifecycle mess
3333 mutating func tryAsHardAsWeCanToShutdownApplication( ) throws {
34+ if let threadPool = try context. app? . make ( BlockingIOThreadPool . self) {
35+ try threadPool. syncShutdownGracefully ( )
36+ }
37+
3438 struct ApplicationDidNotGoAway : Error {
3539 var description : String
3640 }
You can’t perform that action at this time.
0 commit comments