Skip to content

Commit

Permalink
reformat again
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge committed Sep 19, 2024
1 parent aecf5ff commit ea46e8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ void shouldThrowExceptionWhenTooManyCommandLineArgsProvided() {
void shouldCreateConfig_propertiesLoadedFromFile()
throws ConfigurationException, ArgumentsParsingException {
// Given
String filePath = ClassLoader.getSystemClassLoader().getResource("validConfig.properties").getPath();
String filePath =
ClassLoader.getSystemClassLoader().getResource("validConfig.properties").getPath();
List<String> args = Arrays.asList("-config", filePath);
JmxScraperConfigFactory configFactory = new JmxScraperConfigFactory();

Expand All @@ -61,7 +62,8 @@ void shouldCreateConfig_propertiesLoadedFromFile()
void shouldCreateConfig_propertiesLoadedFromStdIn()
throws ConfigurationException, ArgumentsParsingException, IOException {
InputStream originalIn = System.in;
try(InputStream stream = ClassLoader.getSystemClassLoader().getResourceAsStream("validConfig.properties")) {
try (InputStream stream =
ClassLoader.getSystemClassLoader().getResourceAsStream("validConfig.properties")) {
// Given
System.setIn(stream);
List<String> args = Arrays.asList("-config", "-");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ void shouldFailValidation_missingConfigPathAndTargetSystem() {
// When and Then
assertThatThrownBy(() -> configFactory.createConfig(properties))
.isInstanceOf(ConfigurationException.class)
.hasMessage(
"otel.jmx.custom.scraping.config or otel.jmx.target.system must be specified.");
.hasMessage("otel.jmx.custom.scraping.config or otel.jmx.target.system must be specified.");
}

@Test
Expand Down

0 comments on commit ea46e8d

Please sign in to comment.