Skip to content

Commit cfd51e0

Browse files
authored
Remove large temp file after FS tests (#2658)
* Remove large temp file after FS tests Motivation: One of the file system tests copies a large file but didn't clear up after itself. Modifications: - Remove the files after the test Result: Less disk space used * remove tmp
1 parent 0fbf6f1 commit cfd51e0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,11 @@ final class FileSystemTests: XCTestCase {
562562
func testCopyLargeFile() async throws {
563563
let sourcePath = try await self.fs.temporaryFilePath()
564564
let destPath = try await self.fs.temporaryFilePath()
565+
self.addTeardownBlock {
566+
_ = try? await self.fs.removeItem(at: sourcePath)
567+
_ = try? await self.fs.removeItem(at: destPath)
568+
}
569+
565570
let sourceInfo = try await self.fs.withFileHandle(
566571
forWritingAt: sourcePath,
567572
options: .newFile(replaceExisting: false)

docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ services:
4949
update-benchmark-baseline:
5050
<<: *common
5151
command: /bin/bash -xcl "cd Benchmarks && swift package --disable-sandbox --scratch-path .build/$${SWIFT_VERSION-}/ --allow-writing-to-package-directory benchmark --format metricP90AbsoluteThresholds --path Thresholds/$${SWIFT_VERSION-}/"
52-
52+
5353
cxx-interop-build:
5454
<<: *common
5555
command: /bin/bash -xcl "./scripts/cxx-interop-compatibility.sh"

0 commit comments

Comments
 (0)