Skip to content

Commit

Permalink
fix(dev-mode): live reload failing with Zip archives generated by co…
Browse files Browse the repository at this point in the history
…de.quarkus.io due to time zone issue

    this fixes the issue by implementing a solution proposed by this comment
    quarkusio/quarkus#4064 (comment) and just check if last
    recorded time and current modification time are different.
  • Loading branch information
Luca Di Grazia committed Sep 4, 2022
1 parent 0ef9cc5 commit a8d487f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,6 @@ private Set<String> checkForFileChange() {
continue;
}
Path root = Paths.get(rootPath);
if (!Files.exists(root) || !Files.isReadable(root)) {
continue;
}
Path classesDir = Paths.get(module.getClassesPath());
//copy all modified non hot deployment files over
if (doCopy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.IntStream;

import org.apache.commons.io.FileUtils;
import org.apache.maven.shared.invoker.MavenInvocationException;
Expand Down Expand Up @@ -44,17 +43,6 @@ public void testThatClassAppCanRun() throws MavenInvocationException, IOExceptio
assertThatOutputWorksCorrectly(running.log());
}

@Test
public void testThatResteasyWithoutUndertowCanRun() throws MavenInvocationException, IOException {
testDir = initProject("projects/classic-no-undertow", "projects/project-classic-no-undertow-run");
run();

//make sure that a simple HTTP GET request always works
IntStream.range(0, 10).forEach(i -> {
assertThat(getStrictHttpResponse("/hello", 200)).isTrue();
});
}

@Test
public void testThatTheApplicationIsReloadedOnJavaChange() throws MavenInvocationException, IOException {
testDir = initProject("projects/classic", "projects/project-classic-run-java-change");
Expand Down Expand Up @@ -339,31 +327,6 @@ public void testThatAddingConfigFileWorksCorrectly() throws MavenInvocationExcep
.until(() -> getHttpResponse("/app/hello/greeting").contains(uuid));
}

@Test
public void testThatExternalConfigOverridesConfigInJar() throws MavenInvocationException, IOException {
testDir = initProject("projects/classic", "projects/project-classic-external-config");
File configurationFile = new File(testDir, "target/config/application.properties");
assertThat(configurationFile).doesNotExist();

String uuid = UUID.randomUUID().toString();

FileUtils.write(configurationFile,
"greeting=" + uuid,
"UTF-8");
await()
.pollDelay(1, TimeUnit.SECONDS)
.pollInterval(1, TimeUnit.SECONDS)
.until(configurationFile::isFile);

run();

// Wait until we get "uuid"
await()
.pollDelay(1, TimeUnit.SECONDS)
.atMost(10, TimeUnit.SECONDS)
.until(() -> getHttpResponse("/app/hello/greeting").contains(uuid));
}

@Test
public void testThatNewResourcesAreServed() throws MavenInvocationException, IOException {
testDir = initProject("projects/classic", "projects/project-classic-run-resource-change");
Expand Down

0 comments on commit a8d487f

Please sign in to comment.