Improve environment defaults

This commit is contained in:
Peter Palaga
2020-06-21 20:04:29 +02:00
parent 87c71ceadd
commit 3107f08b87
6 changed files with 125 additions and 99 deletions

View File

@@ -27,6 +27,7 @@ import java.util.Set;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.jboss.fuse.mvnd.client.BuildProperties;
import org.jboss.fuse.mvnd.client.Client;
import org.jboss.fuse.mvnd.client.ClientOutput;
import org.jboss.fuse.mvnd.client.DefaultClient;
@@ -83,7 +84,7 @@ public class InstallDaemonNativeIT {
PosixFilePermission.OTHERS_EXECUTE);
}
final String version = DefaultClient.loadBuildProperties().getProperty("version");
final String version = BuildProperties.getInstance().getVersion();
Assertions.assertThat(mavenHome.resolve("lib/ext/mvnd-client-" + version + ".jar")).exists();
Assertions.assertThat(mavenHome.resolve("lib/ext/mvnd-daemon-" + version + ".jar")).exists();
}

View File

@@ -27,6 +27,7 @@ import java.util.Objects;
import java.util.stream.Stream;
import org.jboss.fuse.mvnd.client.DefaultClient;
import org.jboss.fuse.mvnd.client.BuildProperties;
import org.jboss.fuse.mvnd.client.Client;
import org.jboss.fuse.mvnd.client.DaemonInfo;
import org.jboss.fuse.mvnd.client.DaemonRegistry;
@@ -92,7 +93,7 @@ public class MvndTestExtension implements BeforeAllCallback, BeforeEachCallback,
}
f.set(testInstance, new NativeTestClient(resource.layout, mvndNativeExecutablePath, resource.timeoutMs));
} else {
f.set(testInstance, new DefaultClient(resource.layout));
f.set(testInstance, new DefaultClient(() -> resource.layout, BuildProperties.getInstance()));
}
} else if (f.getType() == NativeTestClient.class) {
}