Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a254a030
authored
Jan 09, 2019
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
升级 xxl-rpc 依赖;
parent
d54d679e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
xxl-job-admin/src/test/java/com/xxl/job/adminbiz/AdminBizTest.java
xxl-job-admin/src/test/java/com/xxl/job/executor/ExecutorBizTest.java
xxl-job-admin/src/test/java/com/xxl/job/adminbiz/AdminBizTest.java
View file @
a254a030
...
...
@@ -4,6 +4,7 @@ import com.xxl.job.core.biz.AdminBiz;
import
com.xxl.job.core.biz.model.RegistryParam
;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.enums.RegistryConfig
;
import
com.xxl.rpc.remoting.invoker.XxlRpcInvokerFactory
;
import
com.xxl.rpc.remoting.invoker.call.CallType
;
import
com.xxl.rpc.remoting.invoker.reference.XxlRpcReferenceBean
;
import
com.xxl.rpc.remoting.invoker.route.LoadBalance
;
...
...
@@ -48,6 +49,9 @@ public class AdminBizTest {
RegistryParam
registryParam
=
new
RegistryParam
(
RegistryConfig
.
RegistType
.
EXECUTOR
.
name
(),
"xxl-job-executor-example"
,
"127.0.0.1:9999"
);
ReturnT
<
String
>
returnT
=
adminBiz
.
registry
(
registryParam
);
Assert
.
assertTrue
(
returnT
.
getCode
()
==
ReturnT
.
SUCCESS_CODE
);
// stop invoker
XxlRpcInvokerFactory
.
getInstance
().
stop
();
}
/**
...
...
@@ -75,6 +79,9 @@ public class AdminBizTest {
RegistryParam
registryParam
=
new
RegistryParam
(
RegistryConfig
.
RegistType
.
EXECUTOR
.
name
(),
"xxl-job-executor-example"
,
"127.0.0.1:9999"
);
ReturnT
<
String
>
returnT
=
adminBiz
.
registryRemove
(
registryParam
);
Assert
.
assertTrue
(
returnT
.
getCode
()
==
ReturnT
.
SUCCESS_CODE
);
// stop invoker
XxlRpcInvokerFactory
.
getInstance
().
stop
();
}
}
xxl-job-admin/src/test/java/com/xxl/job/executor/ExecutorBizTest.java
View file @
a254a030
...
...
@@ -5,6 +5,7 @@ import com.xxl.job.core.biz.model.ReturnT;
import
com.xxl.job.core.biz.model.TriggerParam
;
import
com.xxl.job.core.enums.ExecutorBlockStrategyEnum
;
import
com.xxl.job.core.glue.GlueTypeEnum
;
import
com.xxl.rpc.remoting.invoker.XxlRpcInvokerFactory
;
import
com.xxl.rpc.remoting.invoker.call.CallType
;
import
com.xxl.rpc.remoting.invoker.reference.XxlRpcReferenceBean
;
import
com.xxl.rpc.remoting.invoker.route.LoadBalance
;
...
...
@@ -33,7 +34,7 @@ public class ExecutorBizTest {
* @param jobHandler
* @param params
*/
private
static
void
runTest
(
String
jobHandler
,
String
params
){
private
static
void
runTest
(
String
jobHandler
,
String
params
)
throws
Exception
{
// trigger data
TriggerParam
triggerParam
=
new
TriggerParam
();
triggerParam
.
setJobId
(
1
);
...
...
@@ -62,6 +63,9 @@ public class ExecutorBizTest {
null
).
getObject
();
ReturnT
<
String
>
runResult
=
executorBiz
.
run
(
triggerParam
);
System
.
out
.
println
(
runResult
);
XxlRpcInvokerFactory
.
getInstance
().
stop
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment