You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "biyuhao (GitHub)" <gi...@apache.org> on 2019/01/29 08:08:26 UTC

[GitHub] [incubator-dubbo] biyuhao opened pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

## What is the purpose of the change
limit console output of unit test
Fix #3361

## Brief changelog

Make DubboAppender extends from FileAppender
Tweak unit test log path

## Verifying this change

UT pass and Travis log size drop to about 1.5MB
for local environment there should be a `dubbo.log` file contains unit test log.

Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=h1) Report
> Merging [#3383](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/47abf6c8a95feac962d4591f15158b0573decc70?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master    #3383      +/-   ##
============================================
+ Coverage     63.83%   63.84%   +0.01%     
  Complexity       71       71              
============================================
  Files           661      661              
  Lines         28638    28640       +2     
  Branches       4824     4824              
============================================
+ Hits          18280    18285       +5     
  Misses         8133     8133              
+ Partials       2225     2222       -3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...a/org/apache/dubbo/common/utils/DubboAppender.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRHViYm9BcHBlbmRlci5qYXZh) | `100% <100%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/transport/AbstractPeer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RQZWVyLmphdmE=) | `58.69% <0%> (-4.35%)` | `0% <0%> (ø)` | |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `79.37% <0%> (-1.17%)` | `0% <0%> (ø)` | |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `56.82% <0%> (+0.36%)` | `0% <0%> (ø)` | :arrow_down: |
| [...dubbo/remoting/exchange/support/DefaultFuture.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L0RlZmF1bHRGdXR1cmUuamF2YQ==) | `72.97% <0%> (+2.02%)` | `0% <0%> (ø)` | :arrow_down: |
| [...bo/rpc/cluster/support/FailbackClusterInvoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9GYWlsYmFja0NsdXN0ZXJJbnZva2VyLmphdmE=) | `70.49% <0%> (+3.27%)` | `0% <0%> (ø)` | :arrow_down: |
| [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `73.21% <0%> (+3.57%)` | `0% <0%> (ø)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?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-dubbo/pull/3383?src=pr&el=footer). Last update [47abf6c...b148390](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] ralf0131 closed pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
[ pull request closed by ralf0131 ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=h1) Report
> Merging [#3383](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/47abf6c8a95feac962d4591f15158b0573decc70?src=pr&el=desc) will **increase** coverage by `0.1%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##             master    #3383     +/-   ##
===========================================
+ Coverage     63.83%   63.93%   +0.1%     
  Complexity       71       71             
===========================================
  Files           661      661             
  Lines         28638    28604     -34     
  Branches       4824     4821      -3     
===========================================
+ Hits          18280    18288      +8     
+ Misses         8133     8097     -36     
+ Partials       2225     2219      -6
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...a/org/apache/dubbo/common/utils/DubboAppender.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRHViYm9BcHBlbmRlci5qYXZh) | `100% <100%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ache/dubbo/remoting/transport/AbstractChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDaGFubmVsLmphdmE=) | `75% <0%> (-12.5%)` | `0% <0%> (ø)` | |
| [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `60.71% <0%> (-8.93%)` | `0% <0%> (ø)` | |
| [.../config/spring/status/DataSourceStatusChecker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvc3RhdHVzL0RhdGFTb3VyY2VTdGF0dXNDaGVja2VyLmphdmE=) | `72.97% <0%> (-1.39%)` | `0% <0%> (ø)` | |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `80.31% <0%> (-0.23%)` | `0% <0%> (ø)` | |
| [.../main/java/org/apache/dubbo/qos/textui/TTable.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3RleHR1aS9UVGFibGUuamF2YQ==) | `83.79% <0%> (-0.1%)` | `0% <0%> (ø)` | |
| [...in/java/org/apache/dubbo/config/ServiceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9TZXJ2aWNlQ29uZmlnLmphdmE=) | `55.67% <0%> (-0.08%)` | `0% <0%> (ø)` | |
| [...oting/telnet/support/command/LogTelnetHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90ZWxuZXQvc3VwcG9ydC9jb21tYW5kL0xvZ1RlbG5ldEhhbmRsZXIuamF2YQ==) | `0% <0%> (ø)` | `0% <0%> (ø)` | :arrow_down: |
| [...org/apache/dubbo/registry/redis/RedisRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktcmVkaXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlZ2lzdHJ5L3JlZGlzL1JlZGlzUmVnaXN0cnkuamF2YQ==) | `32.67% <0%> (+0.09%)` | `0% <0%> (ø)` | :arrow_down: |
| [...c/main/java/org/apache/dubbo/qos/textui/TTree.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3RleHR1aS9UVHJlZS5qYXZh) | `68% <0%> (+0.46%)` | `0% <0%> (ø)` | :arrow_down: |
| ... and [12 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3383/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?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-dubbo/pull/3383?src=pr&el=footer). Last update [47abf6c...8695eb4](https://codecov.io/gh/apache/incubator-dubbo/pull/3383?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] ralf0131 commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
I see, so this way just not work, abandoned :)

> > > How about in .travis.yml, use linux pipe to redirect to file:
> > > ```
> > > ./mvnw clean test xxx xxx  > dubbo.log 2>&1
> > > ```
> > > And after failure, using the same `tail -n 1000 dubbo.log`
> > 
> > 
> > I'll try this one in my repo later.
> 
> Seems it's not working.
> 
> ```
> No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
> Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
> 
> The build has been terminated
> ```
> https://api.travis-ci.org/v3/job/486256538/log.txt



[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] biyuhao commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "biyuhao (GitHub)" <gi...@apache.org>.
travis log for jdk8 is about `1.52MB` https://api.travis-ci.org/v3/job/485782659/log.txt
travis log for jdk11 is ablout `1.53 MB` https://api.travis-ci.org/v3/job/485782658/log.txt

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] biyuhao commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "biyuhao (GitHub)" <gi...@apache.org>.
> How about in .travis.yml, use linux pipe to redirect to file:
> 
> ```
> ./mvnw clean test xxx xxx  > dubbo.log 2>&1
> ```
> And after failure, using the same `tail -n 1000 dubbo.log`

I'll try this one in my repo later.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] biyuhao commented on issue #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "biyuhao (GitHub)" <gi...@apache.org>.
> > How about in .travis.yml, use linux pipe to redirect to file:
> > ```
> > ./mvnw clean test xxx xxx  > dubbo.log 2>&1
> > ```
> > And after failure, using the same `tail -n 1000 dubbo.log`
> 
> I'll try this one in my repo later.

Seems it's not working.
```
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

The build has been terminated
```

https://api.travis-ci.org/v3/job/486256538/log.txt

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] biyuhao commented on pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "biyuhao (GitHub)" <gi...@apache.org>.
This will initialize output file with a default value.
Usually, we will overwrite it in `log4j.xml`, in this PR we use `<param name="File" value="../../dubbo.log"/>`

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] biyuhao closed pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "biyuhao (GitHub)" <gi...@apache.org>.
[ pull request closed by biyuhao ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
should we not read this from constant or from some config?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] ralf0131 commented on pull request #3383: [Dubbo-3361] Make DubboAppender extends from FileAppender

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
If that is the case, it is better to add a 

```java
private static final String DEFAULT_FILE_NAME = "dubbo.log";
```

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3383 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org