Skip to content

Commit

Permalink
Disable Native tests for module 022 because #quarkus/17653
Browse files Browse the repository at this point in the history
Adding external properties on Native make the app fail to start. Reported by quarkusio/quarkus#17653
sd
Sgitario committed Jun 3, 2021
1 parent 19ce4e0 commit 93517ab
Showing 6 changed files with 25 additions and 11 deletions.
5 changes: 5 additions & 0 deletions 022-quarkus-properties-config-all/pom.xml
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.additional-build-args>-H:ResourceConfigurationFiles=resources-config.json</quarkus.native.additional-build-args>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.qe.providers;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.Set;
@@ -15,7 +16,7 @@ public class CustomConfigSource implements ConfigSource {

private final Properties customProperties = new Properties();

public CustomConfigSource() {
public CustomConfigSource() throws IOException {
loadProperties();
}

@@ -39,16 +40,12 @@ public String getName() {
return "Custom Config Source";
}

public void loadProperties() {
try {
InputStream in = CustomConfigSource.class.getResourceAsStream(PROPERTIES_FILE);
if (in != null) {
customProperties.load(in);
} else {
throw new FileNotFoundException("Property file " + PROPERTIES_FILE + " not found in the classpath");
}
} catch (Exception e) {
e.printStackTrace();
public void loadProperties() throws IOException {
InputStream in = CustomConfigSource.class.getResourceAsStream(PROPERTIES_FILE);
if (in != null) {
customProperties.load(in);
} else {
throw new FileNotFoundException("Property file " + PROPERTIES_FILE + " not found in the classpath");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package io.quarkus.qe.bulk;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.junit.NativeImageTest;

@Disabled("TODO: Can't add configsource.properties because of https://github.com/quarkusio/quarkus/issues/17653")
@NativeImageTest
public class NativeBulkOfPropertiesIT extends BulkOfPropertiesTest {

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package io.quarkus.qe.bulk;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.junit.NativeImageTest;

@Disabled("TODO: Can't add configsource.properties because of https://github.com/quarkusio/quarkus/issues/17653")
@NativeImageTest
public class NativeConfigValueIT extends ConfigValueTest {

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package io.quarkus.qe.config;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.junit.NativeImageTest;

@Disabled("TODO: Can't add configsource.properties because of https://github.com/quarkusio/quarkus/issues/17653")
@NativeImageTest
public class VariousConfigurationSourcesTestIT extends VariousConfigurationSourcesTest {

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package io.quarkus.qe.configmapping;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.junit.NativeImageTest;

@Disabled("TODO: Can't add configsource.properties because of https://github.com/quarkusio/quarkus/issues/17653")
@NativeImageTest
public class NativeConfigMappingResourceIT extends ConfigMappingResourceTest {
}

0 comments on commit 93517ab

Please sign in to comment.