aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2019-11-15 18:43:11 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2019-11-15 18:43:11 +0200
commit87b6d1906473b2d82d0f66530d783d2b9da9be6f (patch)
tree597937e88c72b94db60e5c6e523650f4f1cbec50
parentce53fa3063d361e6c392db92ce6fe908e527d4d9 (diff)
downloadpf4j-87b6d1906473b2d82d0f66530d783d2b9da9be6f.tar.gz
pf4j-87b6d1906473b2d82d0f66530d783d2b9da9be6f.zip
Fix flaky test DefaultPluginRepositoryTest.testGetPluginArchive
-rw-r--r--pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
index c564543..3e31811 100644
--- a/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/DefaultPluginRepositoryTest.java
@@ -18,6 +18,7 @@ package org.pf4j;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import org.pf4j.plugin.PluginZip;
import java.io.IOException;
import java.nio.file.Files;
@@ -43,7 +44,7 @@ public class DefaultPluginRepositoryTest {
// Prove that we can delete a folder with a file inside
Files.createFile(plugin1Path.resolve("myfile"));
// Create a zip file for plugin-1 to test that it is deleted when plugin is deleted
- Files.createFile(pluginsPath.resolve("plugin-1.zip"));
+ new PluginZip.Builder(pluginsPath.resolve("plugin-1.zip"), "plugin-1").pluginVersion("1.0").build();
Files.createDirectory(pluginsPath.resolve("plugin-2"));
Files.createDirectory(pluginsPath.resolve("plugin-3"));
}