forked from apache/dubbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade junt to junit5 (apache#3149)
* upgrade junit to junit5 * modify test * 批量修改upgrade_junt_to_junit5 * 删除多余的文件 * fi test case * Disabled soem test case temporarily * upgrade junit to junit5 and batch modify test case * copy some code from jupiter5.4.0.M1 for some issues * 修改rat福泽 * update rat path * revert case * add junit-platform-surefire-provider to maven-surefire-plugin * update dependency * fix coverage issue (#1) * use jupiter 5.4.0-M1 and remove junit5 source code
- Loading branch information
Showing
336 changed files
with
4,613 additions
and
4,293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ | |
import org.apache.dubbo.common.utils.NetUtils; | ||
import org.apache.dubbo.rpc.cluster.configurator.consts.UrlConstant; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* OverrideConfiguratorTest | ||
|
@@ -34,35 +34,35 @@ public void testOverrideApplication() { | |
AbsentConfigurator configurator = new AbsentConfigurator(URL.valueOf("override://[email protected]/com.foo.BarService?timeout=200")); | ||
|
||
URL url = configurator.configure(URL.valueOf(UrlConstant.URL_CONSUMER)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.URL_ONE)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.APPLICATION_BAR_SIDE_CONSUMER_11)); | ||
Assert.assertNull(url.getParameter("timeout")); | ||
Assertions.assertNull(url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.TIMEOUT_1000_SIDE_CONSUMER_11)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
} | ||
|
||
@Test | ||
public void testOverrideHost() { | ||
AbsentConfigurator configurator = new AbsentConfigurator(URL.valueOf("override://" + NetUtils.getLocalHost() + "/com.foo.BarService?timeout=200")); | ||
|
||
URL url = configurator.configure(URL.valueOf(UrlConstant.URL_CONSUMER)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.URL_ONE)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
|
||
AbsentConfigurator configurator1 = new AbsentConfigurator(URL.valueOf(UrlConstant.SERVICE_TIMEOUT_200)); | ||
|
||
url = configurator1.configure(URL.valueOf(UrlConstant.APPLICATION_BAR_SIDE_CONSUMER_10)); | ||
Assert.assertNull(url.getParameter("timeout")); | ||
Assertions.assertNull(url.getParameter("timeout")); | ||
|
||
url = configurator1.configure(URL.valueOf(UrlConstant.TIMEOUT_1000_SIDE_CONSUMER_10)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
import org.apache.dubbo.rpc.cluster.configurator.absent.AbsentConfigurator; | ||
import org.apache.dubbo.rpc.cluster.configurator.consts.UrlConstant; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* OverrideConfiguratorTest | ||
|
@@ -34,35 +34,35 @@ public void testOverride_Application() { | |
OverrideConfigurator configurator = new OverrideConfigurator(URL.valueOf("override://[email protected]/com.foo.BarService?timeout=200")); | ||
|
||
URL url = configurator.configure(URL.valueOf(UrlConstant.URL_CONSUMER)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.URL_ONE)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.APPLICATION_BAR_SIDE_CONSUMER_11)); | ||
Assert.assertNull(url.getParameter("timeout")); | ||
Assertions.assertNull(url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.TIMEOUT_1000_SIDE_CONSUMER_11)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
} | ||
|
||
@Test | ||
public void testOverride_Host() { | ||
OverrideConfigurator configurator = new OverrideConfigurator(URL.valueOf("override://" + NetUtils.getLocalHost() + "/com.foo.BarService?timeout=200")); | ||
|
||
URL url = configurator.configure(URL.valueOf(UrlConstant.URL_CONSUMER)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
url = configurator.configure(URL.valueOf(UrlConstant.URL_ONE)); | ||
Assert.assertEquals("200", url.getParameter("timeout")); | ||
Assertions.assertEquals("200", url.getParameter("timeout")); | ||
|
||
AbsentConfigurator configurator1 = new AbsentConfigurator(URL.valueOf("override://10.20.153.10/com.foo.BarService?timeout=200")); | ||
|
||
url = configurator1.configure(URL.valueOf(UrlConstant.APPLICATION_BAR_SIDE_CONSUMER_10)); | ||
Assert.assertNull(url.getParameter("timeout")); | ||
Assertions.assertNull(url.getParameter("timeout")); | ||
|
||
url = configurator1.configure(URL.valueOf(UrlConstant.TIMEOUT_1000_SIDE_CONSUMER_10)); | ||
Assert.assertEquals("1000", url.getParameter("timeout")); | ||
Assertions.assertEquals("1000", url.getParameter("timeout")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.