From 7072eea4c70d814c55bd7da452b513e4ea4f8a1b Mon Sep 17 00:00:00 2001 From: Sergey Nuyanzin Date: Wed, 22 Apr 2026 08:25:11 +0200 Subject: [PATCH] [FLINK-33903][ci] Reenable tests in GHA --- .github/workflows/template.flink-ci.yml | 19 ++++++++++++-- .../core/fs/local/LocalFileSystemTest.java | 2 -- .../org/apache/flink/util/FileUtilsTest.java | 2 -- .../handlers/JarDeleteHandlerTest.java | 2 -- .../runtime/blob/BlobCacheDeleteTest.java | 3 --- .../flink/runtime/blob/BlobCacheGetTest.java | 9 ------- .../flink/runtime/blob/BlobCachePutTest.java | 10 ------- .../runtime/blob/BlobServerDeleteTest.java | 4 --- .../flink/runtime/blob/BlobServerGetTest.java | 5 ---- .../flink/runtime/blob/BlobServerPutTest.java | 10 ------- .../blob/BlobUtilsNonWritableTest.java | 2 -- .../BlobLibraryCacheManagerTest.java | 3 --- .../runtime/rest/RestServerEndpointTest.java | 2 -- .../FsCheckpointStateOutputStreamTest.java | 2 -- .../TaskManagerRunnerStartupTest.java | 2 -- .../forst/ForStStateBackendConfigTest.java | 3 --- .../RocksDBStateBackendConfigTest.java | 3 --- .../table/catalog/FileCatalogStoreTest.java | 2 -- .../FailsInGHAContainerWithRootUser.java | 26 ------------------- .../JobMasterTriggerSavepointITCase.java | 2 -- pom.xml | 3 --- 21 files changed, 17 insertions(+), 99 deletions(-) delete mode 100644 flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsInGHAContainerWithRootUser.java diff --git a/.github/workflows/template.flink-ci.yml b/.github/workflows/template.flink-ci.yml index 9a7038cfbfcc1..13a9d9aeecc1e 100644 --- a/.github/workflows/template.flink-ci.yml +++ b/.github/workflows/template.flink-ci.yml @@ -247,6 +247,20 @@ jobs: working-directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }} run: ./tools/azure-pipelines/cache_docker_images.sh load + - name: "Create non-root user for test execution" + run: | + useradd -m -u 1001 flink + echo "flink ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + for sock in /var/run/docker.sock /run/docker.sock; do + if [ -e "$sock" ]; then + chmod 660 "$sock" + echo "Docker socket found at $sock" + fi + done + chown -R flink:flink ${{ env.CONTAINER_LOCAL_WORKING_DIR }} + chown -R flink:flink ${{ env.MAVEN_REPO_FOLDER }} + chown -R flink:flink ${{ env.DOCKER_IMAGES_CACHE_FOLDER }} 2>/dev/null || true + - name: "Test - ${{ matrix.module }}" id: test-run working-directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }} @@ -254,10 +268,11 @@ jobs: IT_CASE_S3_BUCKET: ${{ secrets.s3_bucket }} IT_CASE_S3_ACCESS_KEY: ${{ secrets.s3_access_key }} IT_CASE_S3_SECRET_KEY: ${{ secrets.s3_secret_key }} + DOCKER_HOST: unix:///var/run/docker.sock timeout-minutes: ${{ fromJSON(env.GHA_JOB_TIMEOUT) }} run: | - ${{ inputs.environment }} PROFILE="$PROFILE -Pgithub-actions" ./tools/azure-pipelines/uploading_watchdog.sh \ - ./tools/ci/test_controller.sh ${{ matrix.module }} + runuser -u flink -- bash -c '${{ inputs.environment }} PROFILE="$PROFILE -Pgithub-actions" ./tools/azure-pipelines/uploading_watchdog.sh \ + ./tools/ci/test_controller.sh ${{ matrix.module }}' - name: "Post-build Disk Info" if: ${{ always() }} diff --git a/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java b/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java index dadd7ada77dd4..ffe5bf71c894d 100644 --- a/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java +++ b/flink-core/src/test/java/org/apache/flink/core/fs/local/LocalFileSystemTest.java @@ -30,7 +30,6 @@ import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -234,7 +233,6 @@ void testRenameNonExistingFile() throws IOException { } @Test - @Tag("FailsInGHAContainerWithRootUser") @Disabled void testRenameFileWithNoAccess() throws IOException { final FileSystem fs = FileSystem.getLocalFileSystem(); diff --git a/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java b/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java index 25411483d46c9..0628ace8e0ad7 100644 --- a/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java +++ b/flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java @@ -24,7 +24,6 @@ import org.apache.flink.core.testutils.CheckedThread; import org.apache.flink.testutils.junit.utils.TempDirUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -128,7 +127,6 @@ void testDeleteNonExistentDirectory() throws Exception { FileUtils.deleteDirectory(doesNotExist); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeleteProtectedDirectory() throws Exception { // deleting a write protected file should throw an error diff --git a/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarDeleteHandlerTest.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarDeleteHandlerTest.java index 9d909f2e46665..593559da3d294 100644 --- a/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarDeleteHandlerTest.java +++ b/flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/JarDeleteHandlerTest.java @@ -31,7 +31,6 @@ import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -104,7 +103,6 @@ void testDeleteUnknownJar() throws Exception { }); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testFailedDelete() throws Exception { makeJarDirReadOnly(); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java index c8230bd0015ff..10c1ae7551346 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheDeleteTest.java @@ -24,7 +24,6 @@ import org.apache.flink.util.OperatingSystem; import org.apache.flink.util.concurrent.FutureUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -194,13 +193,11 @@ private void testDeleteTransientAlreadyDeleted(@Nullable final JobID jobId) thro } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeleteTransientLocalFailsNoJob() throws IOException, InterruptedException { testDeleteTransientLocalFails(null); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeleteTransientLocalFailsForJob() throws IOException, InterruptedException { testDeleteTransientLocalFails(new JobID()); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java index dc176b04d8df6..c336a8264f835 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java @@ -25,7 +25,6 @@ import org.apache.flink.util.concurrent.FutureUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -170,19 +169,16 @@ private void testGetFailsDuringLookup( } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsIncomingNoJob() throws IOException { testGetFailsIncoming(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsIncomingForJob() throws IOException { testGetFailsIncoming(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsIncomingForJobHa() throws IOException { testGetFailsIncoming(new JobID(), PERMANENT_BLOB); @@ -268,19 +264,16 @@ private void testGetFailsIncoming(@Nullable final JobID jobId, BlobKey.BlobType } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetTransientFailsStoreNoJob() throws IOException, InterruptedException { testGetFailsStore(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetTransientFailsStoreForJob() throws IOException, InterruptedException { testGetFailsStore(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetPermanentFailsStoreForJob() throws IOException, InterruptedException { testGetFailsStore(new JobID(), PERMANENT_BLOB); @@ -402,13 +395,11 @@ void testGetFailsHaStoreForJobHa() throws IOException { } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetTransientRemoteDeleteFailsNoJob() throws IOException { testGetTransientRemoteDeleteFails(null); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetTransientRemoteDeleteFailsForJob() throws IOException { testGetTransientRemoteDeleteFails(new JobID()); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java index 1c81a4e22d7f8..ce76e50901b32 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java @@ -28,7 +28,6 @@ import org.apache.flink.util.concurrent.FutureUtils; import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -521,19 +520,16 @@ private void testPutChunkedStreamTransientSuccessfulGet( // -------------------------------------------------------------------------------------------- - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsNoJob() throws IOException { testPutBufferFails(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsForJob() throws IOException { testPutBufferFails(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsForJobHa() throws IOException { testPutBufferFails(new JobID(), PERMANENT_BLOB); @@ -574,19 +570,16 @@ private void testPutBufferFails(@Nullable final JobID jobId, BlobKey.BlobType bl } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingNoJob() throws IOException { testPutBufferFailsIncoming(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingForJob() throws IOException { testPutBufferFailsIncoming(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingForJobHa() throws IOException { testPutBufferFailsIncoming(new JobID(), PERMANENT_BLOB); @@ -638,19 +631,16 @@ private void testPutBufferFailsIncoming(@Nullable final JobID jobId, BlobKey.Blo } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreNoJob() throws IOException { testPutBufferFailsStore(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreForJob() throws IOException { testPutBufferFailsStore(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreForJobHa() throws IOException { testPutBufferFailsStore(new JobID(), PERMANENT_BLOB); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java index 9815240cbff27..72ce4e3eb9823 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java @@ -25,7 +25,6 @@ import org.apache.flink.util.Preconditions; import org.apache.flink.util.concurrent.FutureUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -191,19 +190,16 @@ private void testDeleteBlobAlreadyDeleted( } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeleteTransientFailsNoJob() throws IOException { testDeleteBlobFails(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeleteTransientFailsForJob() throws IOException { testDeleteBlobFails(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testDeletePermanentFailsForJob() throws IOException { testDeleteBlobFails(new JobID(), PERMANENT_BLOB); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java index 179a41fd35dd7..fc6e69415f8b1 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerGetTest.java @@ -31,7 +31,6 @@ import org.apache.flink.util.concurrent.FutureUtils; import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -149,7 +148,6 @@ private void testGetFailsDuringLookup( * Retrieves a BLOB from the HA store to a {@link BlobServer} which cannot create incoming * files. File transfers should fail. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsIncomingForJobHa() throws IOException { assumeThat(OperatingSystem.isWindows()).as("setWritable doesn't work on Windows").isFalse(); @@ -222,7 +220,6 @@ void testGetFailsIncomingForJobHa() throws IOException { * Retrieves a BLOB from the HA store to a {@link BlobServer} which cannot create the final * storage file. File transfers should fail. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsStoreForJobHa() throws IOException { assumeThat(OperatingSystem.isWindows()).as("setWritable doesn't work on Windows").isFalse(); @@ -539,7 +536,6 @@ void testGetPermanentFailsDuringLookupForApplication() throws IOException { * Retrieves a BLOB from the HA store to a {@link BlobServer} which cannot create incoming files * for an application. File transfers should fail. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsIncomingForApplicationHa() throws IOException { assumeThat(OperatingSystem.isWindows()).as("setWritable doesn't work on Windows").isFalse(); @@ -615,7 +611,6 @@ void testGetFailsIncomingForApplicationHa() throws IOException { * Retrieves a BLOB from the HA store to a {@link BlobServer} which cannot create the final * storage file for an application. File transfers should fail. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testGetFailsStoreForApplicationHa() throws IOException { assumeThat(OperatingSystem.isWindows()).as("setWritable doesn't work on Windows").isFalse(); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java index 8be15930d06c9..0c9f3155d40d6 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerPutTest.java @@ -30,7 +30,6 @@ import org.apache.flink.util.concurrent.FutureUtils; import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -581,19 +580,16 @@ private void testPutChunkedStreamSuccessfulGetForApplication( // -------------------------------------------------------------------------------------------- - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsNoJob() throws IOException { testPutBufferFails(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsForJob() throws IOException { testPutBufferFails(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsForJobHa() throws IOException { testPutBufferFails(new JobID(), PERMANENT_BLOB); @@ -631,19 +627,16 @@ private void testPutBufferFails(@Nullable final JobID jobId, BlobKey.BlobType bl } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingNoJob() throws IOException { testPutBufferFailsIncoming(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingForJob() throws IOException { testPutBufferFailsIncoming(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsIncomingForJobHa() throws IOException { testPutBufferFailsIncoming(new JobID(), PERMANENT_BLOB); @@ -692,19 +685,16 @@ private void testPutBufferFailsIncoming(@Nullable final JobID jobId, BlobKey.Blo } } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreNoJob() throws IOException { testPutBufferFailsStore(null, TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreForJob() throws IOException { testPutBufferFailsStore(new JobID(), TRANSIENT_BLOB); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testPutBufferFailsStoreForJobHa() throws IOException { testPutBufferFailsStore(new JobID(), PERMANENT_BLOB); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java index b7cf2dc8bd3c5..e0f948ccc6c75 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobUtilsNonWritableTest.java @@ -25,7 +25,6 @@ import org.apache.flink.util.OperatingSystem; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -38,7 +37,6 @@ import static org.assertj.core.api.Assumptions.assumeThat; /** Tests for {@link BlobUtils} working on non-writable directories. */ -@Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") class BlobUtilsNonWritableTest { private static final String CANNOT_CREATE_THIS = "cannot-create-this"; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java index d401c40972379..1047ce577a084 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java @@ -29,7 +29,6 @@ import org.apache.flink.runtime.blob.PermanentBlobKey; import org.apache.flink.runtime.blob.PermanentBlobService; import org.apache.flink.runtime.blob.VoidBlobStore; -import org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser; import org.apache.flink.util.FlinkUserCodeClassLoaders; import org.apache.flink.util.OperatingSystem; import org.apache.flink.util.TestLogger; @@ -37,7 +36,6 @@ import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -330,7 +328,6 @@ public void testLibraryCacheManagerCleanup() throws Exception { } @Test - @Category(FailsInGHAContainerWithRootUser.class) public void testRegisterAndDownload() throws IOException { assumeTrue(!OperatingSystem.isWindows()); // setWritable doesn't work on Windows. diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java index 9289f3db0e391..05d86686a87f7 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointTest.java @@ -18,7 +18,6 @@ package org.apache.flink.runtime.rest; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.slf4j.helpers.NOPLogger; @@ -73,7 +72,6 @@ void testCreateUploadDir(@TempDir File file) throws Exception { assertThat(Files.exists(testUploadDir)).isTrue(); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testCreateUploadDirFails(@TempDir File file) throws Exception { assertThat(file.setWritable(false)); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java index 20c776b61ed44..6f3a30f9c3c95 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStateOutputStreamTest.java @@ -33,7 +33,6 @@ import org.apache.flink.testutils.junit.extensions.parameterized.Parameters; import org.apache.flink.testutils.junit.utils.TempDirUtils; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.io.TempDir; @@ -376,7 +375,6 @@ void testMixedBelowAndAboveThreshold() throws Exception { * This test checks that the stream does not check and clean the parent directory when * encountering a write error. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @TestTemplate void testStreamDoesNotTryToCleanUpParentOnError() throws Exception { final File directory = TempDirUtils.newFolder(tempDir); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java index 61f344d9282c3..126767ded612d 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java @@ -50,7 +50,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.api.io.TempDir; @@ -114,7 +113,6 @@ void tearDownTest() throws Exception { * Tests that the TaskManagerRunner startup fails synchronously when the I/O directories are not * writable. */ - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testIODirectoryNotWritable() throws Exception { File nonWritable = TempDirUtils.newFolder(tempFolder); diff --git a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java index 50f3ac0954bd0..624bbf0b577db 100644 --- a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java +++ b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java @@ -42,7 +42,6 @@ import org.apache.flink.runtime.state.filesystem.FsCheckpointStorageAccess; import org.apache.flink.runtime.state.ttl.TtlTimeProvider; import org.apache.flink.runtime.util.TestingTaskManagerRuntimeInfo; -import org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser; import org.apache.flink.util.FileUtils; import org.apache.commons.lang3.RandomUtils; @@ -58,7 +57,6 @@ import org.junit.Assume; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.jupiter.api.Timeout; import org.junit.rules.TemporaryFolder; @@ -375,7 +373,6 @@ public void testUseTempDirectories() throws Exception { // ------------------------------------------------------------------------ @Test - @Category(FailsInGHAContainerWithRootUser.class) public void testFailWhenNoLocalStorageDir() throws Exception { final File targetDir = tempFolder.newFolder(); Assume.assumeTrue( diff --git a/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBStateBackendConfigTest.java b/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBStateBackendConfigTest.java index b1f78a0c0b85b..1a0a45f804e61 100644 --- a/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBStateBackendConfigTest.java +++ b/flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/state/rocksdb/RocksDBStateBackendConfigTest.java @@ -44,7 +44,6 @@ import org.apache.flink.runtime.state.heap.HeapPriorityQueueSetFactory; import org.apache.flink.runtime.state.ttl.TtlTimeProvider; import org.apache.flink.runtime.util.TestingTaskManagerRuntimeInfo; -import org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser; import org.apache.flink.util.FileUtils; import org.apache.flink.util.IOUtils; @@ -53,7 +52,6 @@ import org.junit.Assume; import org.junit.Rule; import org.junit.Test; -import org.junit.experimental.categories.Category; import org.junit.jupiter.api.Timeout; import org.junit.rules.TemporaryFolder; import org.rocksdb.BlockBasedTableConfig; @@ -474,7 +472,6 @@ public void testUseTempDirectories() throws Exception { // ------------------------------------------------------------------------ @Test - @Category(FailsInGHAContainerWithRootUser.class) public void testFailWhenNoLocalStorageDir() throws Exception { final File targetDir = tempFolder.newFolder(); Assume.assumeTrue( diff --git a/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/catalog/FileCatalogStoreTest.java b/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/catalog/FileCatalogStoreTest.java index 2824605fd6222..011ce881bb84f 100644 --- a/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/catalog/FileCatalogStoreTest.java +++ b/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/catalog/FileCatalogStoreTest.java @@ -23,7 +23,6 @@ import org.apache.flink.util.OperatingSystem; import org.assertj.core.api.ThrowableAssert; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -64,7 +63,6 @@ void testNotOpened() { assertCatalogStoreNotOpened(() -> catalogStore.removeCatalog(DUMMY, true)); } - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") @Test void testCannotMakeStorePath() { assumeThat(OperatingSystem.isWindows()) diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsInGHAContainerWithRootUser.java b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsInGHAContainerWithRootUser.java deleted file mode 100644 index 47ebd03fe7fe6..0000000000000 --- a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/junit/FailsInGHAContainerWithRootUser.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.flink.testutils.junit; - -/** - * Collects tests that fail in GitHub Actions workflows that execute the tests in containers as a - * root user. - * - *

See FLINK-27082/FLINK-33903 - */ -public interface FailsInGHAContainerWithRootUser {} diff --git a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java index 319e65dd0c682..90929d6457162 100644 --- a/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java @@ -55,7 +55,6 @@ import org.apache.flink.util.MdcUtils; import org.junit.jupiter.api.Assumptions; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.api.io.TempDir; @@ -219,7 +218,6 @@ void testStopJobAfterSavepointWithDeactivatedPeriodicCheckpointing( } @Test - @Tag("org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser") void testDoNotCancelJobIfSavepointFails(@InjectClusterClient ClusterClient clusterClient) throws Exception { setUpWithCheckpointInterval(10L, clusterClient); diff --git a/pom.xml b/pom.xml index e89e01f876496..c276d5f4d1aad 100644 --- a/pom.xml +++ b/pom.xml @@ -1031,9 +1031,6 @@ under the License. github-actions - - org.apache.flink.testutils.junit.FailsInGHAContainerWithRootUser -