Skip to content

Commit

Permalink
[Improvement-12333][Test] Migrate all UT cases from jUnit 4 to jUnit …
Browse files Browse the repository at this point in the history
…5 in microbench and e2e module
  • Loading branch information
rickchengx committed Oct 14, 2022
1 parent ac84504 commit 76d5e7e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
package org.apache.dolphinscheduler.e2e.pages.common;

import org.junit.rules.ExpectedException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

import static java.nio.charset.StandardCharsets.UTF_8;

import static org.junit.platform.commons.util.StringUtils.isBlank;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

Expand All @@ -45,7 +43,7 @@ public String getTestId() {
public String getFilesystemFriendlyName() {
final String contextId = context.getUniqueId();
try {
return (isBlank(contextId))
return (contextId == null || contextId.trim().isEmpty())
? UNKNOWN_NAME
: URLEncoder.encode(contextId, UTF_8.toString());
} catch (UnsupportedEncodingException e) {
Expand Down
37 changes: 17 additions & 20 deletions dolphinscheduler-microbench/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>dolphinscheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dolphinscheduler-microbench</artifactId>
<packaging>jar</packaging>
Expand All @@ -35,6 +34,18 @@
<uberjar.name>benchmarks</uberjar.name>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>

<dependency>
Expand All @@ -51,9 +62,8 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>

<dependency>
Expand All @@ -67,18 +77,6 @@

</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -112,5 +110,4 @@
</plugins>
</build>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.io.File;
import java.io.IOException;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Scope;
Expand Down Expand Up @@ -122,4 +122,3 @@ private static int getForks() {
}

}

0 comments on commit 76d5e7e

Please sign in to comment.