Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit5 migration #908

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
20 changes: 18 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Random;
*/

public class ManualCompleteMetricsTest {
class ManualCompleteMetricsTest {

// This contains a complete set of all metric types, and target_info and otel_scope_info.
// I used this to expose in Prometheus format and OTLP format at the same time and compare the results.
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/it-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.prometheus.client.it.common;

import org.junit.Assert;
import org.junit.jupiter.api.Assertions;

import java.io.File;
import java.io.IOException;
Expand All @@ -24,7 +24,7 @@ private Volume(Path tmpDir) {

public static Volume create(String prefix) throws IOException, URISyntaxException {
Path targetDir = Paths.get(Volume.class.getResource("/").toURI()).getParent();
Assert.assertEquals("failed to locate target/ directory", "target", targetDir.getFileName().toString());
Assertions.assertEquals("target", targetDir.getFileName().toString(), "failed to locate target/ directory");
return new Volume(Files.createTempDirectory(targetDir, prefix + "-"));
}

Expand Down Expand Up @@ -56,7 +56,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
}
});
} else {
Assert.fail(src + ": No such file or directory");
Assertions.fail(src + ": No such file or directory");
}
return this;
}
Expand Down
12 changes: 9 additions & 3 deletions integration-tests/it-exporter/it-exporter-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@
<artifactId>prometheus-metrics-exposition-formats</artifactId>
<version>${project.version}</version>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down