From cfd51e06f55ef6e6b857b05dec2dfc03703fe6bb Mon Sep 17 00:00:00 2001 From: George Barnett Date: Mon, 19 Feb 2024 15:42:55 +0100 Subject: [PATCH] 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 --- Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift | 5 +++++ docker/docker-compose.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift index f24736a75..aecb3f034 100644 --- a/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift +++ b/Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift @@ -562,6 +562,11 @@ final class FileSystemTests: XCTestCase { func testCopyLargeFile() async throws { let sourcePath = try await self.fs.temporaryFilePath() let destPath = try await self.fs.temporaryFilePath() + self.addTeardownBlock { + _ = try? await self.fs.removeItem(at: sourcePath) + _ = try? await self.fs.removeItem(at: destPath) + } + let sourceInfo = try await self.fs.withFileHandle( forWritingAt: sourcePath, options: .newFile(replaceExisting: false) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 0c3c846e8..82f2a98f4 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -49,7 +49,7 @@ services: update-benchmark-baseline: <<: *common 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-}/" - + cxx-interop-build: <<: *common command: /bin/bash -xcl "./scripts/cxx-interop-compatibility.sh"