File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Tests/SwiftDocCUtilitiesTests Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,16 @@ class PreviewActionIntegrationTests: XCTestCase {
287287
288288 // This should only take 1.5 seconds (1 second for the directory monitor debounce and 0.5 seconds for the expectation poll interval)
289289 await fulfillment ( of: [ expectation] , timeout: 20.0 )
290+ // This assertion is always true if the expectation was fulfilled. However, in the past this expectation has sometimes (but very rarely) failed.
291+ // If that happens we want to print the full preview action log to help investigate what went wrong.
292+ XCTAssert ( logStorage. text. contains ( " Conversion cancelled... " ) ,
293+ """
294+ PreviewAction log output doesn't contain 'Conversion cancelled...'.
295+ Full log output from the preview action that ran in this test (to investigate the issue):
296+ --------------------------------------------------
297+ \( logStorage. text)
298+ --------------------------------------------------
299+ """ )
290300 }
291301
292302 #endif
You can’t perform that action at this time.
0 commit comments