You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2019/12/27 02:10:52 UTC
[GitHub] [incubator-dolphinscheduler] samz406 opened a new pull request
#1593: API service adds some test cases
samz406 opened a new pull request #1593: API service adds some test cases
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1593
What is the purpose of the pull request
For [#1465](https://github.com/apache/incubator-dolphinscheduler/issues/1465) .
API service adds some test cases
**Brief change log**
**add Test class**
AccessTokenServiceTest.java
QueueServiceTest.java
MonitorServiceTest.java
SessionServiceTest.java
UsersServiceTest.java
TenantServiceTest.java
WorkerGroupServiceTest.java
UdfFuncServiceTest.java
AlertGroupServiceTest.java
ProjectServiceTest.java
**modify service class**
AccessTokenService
UdfFuncService
AlertGroupService
UsersService
WorkerGroupService
CheckUtils
**Add root pom.xml as follow**
`<include>**/api/service/AccessTokenServiceTest.java</include>
<include>**/api/service/QueueServiceTest.java</include>`
`<include>**/api/service/MonitorServiceTest.java</include>
<include>**/api/service/SessionServiceTest.java</include>`
`<include>**/api/service/UsersServiceTest.java</include>
<include>**/api/service/TenantServiceTest.java</include>`
`<include>**/api/service/WorkerGroupServiceTest.java</include>
<include>**/api/service/UdfFuncServiceTest.java</include>`
`<include>**/api/service/AlertGroupServiceTest.java</include>
<include>**/api/service/ProjectServiceTest.java</include>`
**add api pom.xml as follow**
```
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
</exclusions>
</dependency>
```
**Verify this pull request**
**other**
MonitorServiceTest.java need zk server.Test case temporary comments
由于MonitorServiceTest.java需要zk获取master和worker服务,单元测试暂时注释
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-dolphinscheduler] codecov-io commented on issue #1593:
API service adds some test cases
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #1593: API service adds some test cases
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1593#issuecomment-569167960
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`dev@b4355bb`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `14.72%`.
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #1593 +/- ##
======================================
Coverage ? 15.03%
======================================
Files ? 283
Lines ? 13895
Branches ? 2220
======================================
Hits ? 2089
Misses ? 11618
Partials ? 188
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100% <ø> (ø)` | |
| [...server/master/runner/SubProcessTaskExecThread.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL21hc3Rlci9ydW5uZXIvU3ViUHJvY2Vzc1Rhc2tFeGVjVGhyZWFkLmphdmE=) | `0% <ø> (ø)` | |
| [...e/dolphinscheduler/server/worker/WorkerServer.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc2VydmVyL3dvcmtlci9Xb3JrZXJTZXJ2ZXIuamF2YQ==) | `0% <ø> (ø)` | |
| [...phinscheduler/api/configuration/SwaggerConfig.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbmZpZ3VyYXRpb24vU3dhZ2dlckNvbmZpZy5qYXZh) | `0% <ø> (ø)` | |
| [...g/apache/dolphinscheduler/common/model/Server.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL21vZGVsL1NlcnZlci5qYXZh) | `0% <ø> (ø)` | |
| [...onfiguration/ServiceModelToSwagger2MapperImpl.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbmZpZ3VyYXRpb24vU2VydmljZU1vZGVsVG9Td2FnZ2VyMk1hcHBlckltcGwuamF2YQ==) | `0% <ø> (ø)` | |
| [...che/dolphinscheduler/api/ApiApplicationServer.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL0FwaUFwcGxpY2F0aW9uU2VydmVyLmphdmE=) | `0% <ø> (ø)` | |
| [.../org/apache/dolphinscheduler/common/Constants.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL0NvbnN0YW50cy5qYXZh) | `0% <ø> (ø)` | |
| [...olphinscheduler/common/enums/TaskRecordStatus.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2VudW1zL1Rhc2tSZWNvcmRTdGF0dXMuamF2YQ==) | `0% <ø> (ø)` | |
| [...dolphinscheduler/common/enums/ExecutionStatus.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2VudW1zL0V4ZWN1dGlvblN0YXR1cy5qYXZh) | `0% <ø> (ø)` | |
| ... and [24 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=footer). Last update [b4355bb...440c020](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-dolphinscheduler] samz406 closed pull request #1593: API
service adds some test cases
Posted by GitBox <gi...@apache.org>.
samz406 closed pull request #1593: API service adds some test cases
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1593
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-dolphinscheduler] codecov-io edited a comment on issue
#1593: API service adds some test cases
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #1593: API service adds some test cases
URL: https://github.com/apache/incubator-dolphinscheduler/pull/1593#issuecomment-569167960
# [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=h1) Report
> Merging [#1593](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=desc) into [dev](https://codecov.io/gh/apache/incubator-dolphinscheduler/commit/90730133ac560770683c22d7e73713b43a0f41ea?src=pr&el=desc) will **increase** coverage by `5.96%`.
> The diff coverage is `66.66%`.
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## dev #1593 +/- ##
=========================================
+ Coverage 9.06% 15.03% +5.96%
=========================================
Files 283 283
Lines 13843 13895 +52
Branches 2204 2220 +16
=========================================
+ Hits 1255 2089 +834
+ Misses 12495 11618 -877
- Partials 93 188 +95
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/dolphinscheduler/api/utils/CheckUtils.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3V0aWxzL0NoZWNrVXRpbHMuamF2YQ==) | `45.83% <100%> (+8.33%)` | :arrow_up: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100% <100%> (ø)` | :arrow_up: |
| [...lphinscheduler/api/service/AccessTokenService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvQWNjZXNzVG9rZW5TZXJ2aWNlLmphdmE=) | `91.07% <100%> (+91.07%)` | :arrow_up: |
| [...e/dolphinscheduler/api/service/UdfFuncService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvVWRmRnVuY1NlcnZpY2UuamF2YQ==) | `86.84% <100%> (+86.84%)` | :arrow_up: |
| [...olphinscheduler/api/service/AlertGroupService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvQWxlcnRHcm91cFNlcnZpY2UuamF2YQ==) | `88.76% <100%> (+88.76%)` | :arrow_up: |
| [...lphinscheduler/api/service/WorkerGroupService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvV29ya2VyR3JvdXBTZXJ2aWNlLmphdmE=) | `70.31% <14.28%> (+70.31%)` | :arrow_up: |
| [...che/dolphinscheduler/api/service/UsersService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvVXNlcnNTZXJ2aWNlLmphdmE=) | `73.57% <56.66%> (+73.57%)` | :arrow_up: |
| [...e/dolphinscheduler/api/service/ProjectService.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvUHJvamVjdFNlcnZpY2UuamF2YQ==) | `86.36% <71.42%> (+86.36%)` | :arrow_up: |
| [...olphinscheduler/api/controller/BaseController.java](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvQmFzZUNvbnRyb2xsZXIuamF2YQ==) | `3.65% <0%> (+3.65%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=footer). Last update [9073013...440c020](https://codecov.io/gh/apache/incubator-dolphinscheduler/pull/1593?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services