Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore file tests original class naming #5985

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
class NonFlakyFileIT extends NonFlakyFileTest {
class FileIT extends FileTest {

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@

import static org.apache.camel.quarkus.component.file.it.FileResource.SEPARATOR;
import static org.apache.camel.quarkus.component.file.it.FileResource.SORT_BY;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.BATCH_FILE_NAME_1_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.BATCH_FILE_NAME_2_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.CHARSET_READ_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.CHARSET_WRITE_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.CHARSET_WRITE_FILE_CREATION_FOLDER;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.CHARSET_WRITE_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.FILE_CREATION_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.FILE_CREATION_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.FILE_CREATION_FOLDER;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.FILTER_NON_SKIPPED_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.IDEMPOTENT_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.IDEMPOTENT_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.POLL_ENRICH_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.QUARTZ_SCHEDULED_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.READ_LOCK_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.READ_LOCK_FOLDER_IN;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.READ_LOCK_FOLDER_OUT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.SORT_BY_NAME_1_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.SORT_BY_NAME_2_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.SORT_BY_NAME_3_CONTENT;
import static org.apache.camel.quarkus.component.file.it.NonFlakyFileTestResource.TEST_FILES_FOLDER;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.BATCH_FILE_NAME_1_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.BATCH_FILE_NAME_2_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.CHARSET_READ_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.CHARSET_WRITE_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.CHARSET_WRITE_FILE_CREATION_FOLDER;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.CHARSET_WRITE_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.FILE_CREATION_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.FILE_CREATION_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.FILE_CREATION_FOLDER;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.FILTER_NON_SKIPPED_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.IDEMPOTENT_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.IDEMPOTENT_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.POLL_ENRICH_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.QUARTZ_SCHEDULED_FILE_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.READ_LOCK_FILE_NAME;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.READ_LOCK_FOLDER_IN;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.READ_LOCK_FOLDER_OUT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.SORT_BY_NAME_1_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.SORT_BY_NAME_2_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.SORT_BY_NAME_3_CONTENT;
import static org.apache.camel.quarkus.component.file.it.FileTestResource.TEST_FILES_FOLDER;
import static org.apache.commons.io.FileUtils.readFileToString;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.core.IsEqual.equalTo;
Expand All @@ -74,8 +74,8 @@
* Linked to https://github.com/apache/camel-quarkus/issues/3584
*/
@QuarkusTest
@QuarkusTestResource(NonFlakyFileTestResource.class)
class NonFlakyFileTest {
@QuarkusTestResource(FileTestResource.class)
class FileTest {

@Test
void idempotentFileShouldBeReadOnlyOnce() throws IOException, InterruptedException {
Expand Down Expand Up @@ -234,7 +234,7 @@ void filesCreatedInWrongOrderShouldBeSortedByReverseFilename() {

@Test
public void fileWatchShouldCatchCreateModifyAndDeleteEvents() throws IOException {
final Path fileWatchDirectory = Files.createTempDirectory(NonFlakyFileTest.class.getSimpleName()).toRealPath();
final Path fileWatchDirectory = Files.createTempDirectory(FileTest.class.getSimpleName()).toRealPath();
RestAssured.given()
.queryParam("path", fileWatchDirectory.toString())
.get("/file-watch/get-events")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* Ensures that all test files are created with expected content before camel routes starts to consume them.
*/
public class NonFlakyFileTestResource implements QuarkusTestResourceLifecycleManager {
public class FileTestResource implements QuarkusTestResourceLifecycleManager {

static final Path TEST_FILES_FOLDER = Paths.get("target", "test-files");

Expand Down
Loading