You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2015/10/15 07:41:05 UTC

[jira] [Updated] (REEF-850) Delete or suppress verbose outputs in Unit Test

     [ https://issues.apache.org/jira/browse/REEF-850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun updated REEF-850:
-------------------------------
    Description: 
`TestCombiner` generates about 1100 lines. It's a little bit debugging message since nobody examines those lines. (over 15%)

{code}
public void onNext(final Entry<Integer, Integer> value) {
-  System.out.println(value.getKey() + "=" + value.getValue());
  x.incrementAndGet();
{code}

`HostnameBasedLocalAddressProvider` generates meaningful messages but its level is too high. We can save 770 lines. (over 10%)
{code}
  private HostnameBasedLocalAddressProvider() {
-    LOG.log(Level.INFO, "Instantiating HostnameBasedLocalAddressProvider");
+    LOG.log(Level.FINE, "Instantiating HostnameBasedLocalAddressProvider");
  }
{code}

This PR will make it easy to review the test result.

For consistency, `LegacyLocalAddressProvider` should be changed, too.
{code}
  private LegacyLocalAddressProvider() {
-    LOG.log(Level.INFO, "Instantiating LegacyLocalAddressProvider");
+    LOG.log(Level.FINE, "Instantiating LegacyLocalAddressProvider");
  }
{code}

  was:
`TestCombiner` generates about 1100 lines. It's a little bit debugging message since nobody examines those lines. (over 15%)

{code}
public void onNext(final Entry<Integer, Integer> value) {
-  System.out.println(value.getKey() + "=" + value.getValue());
  x.incrementAndGet();
{code}

`HostnameBasedLocalAddressProvider` generates meaningful messages but its level is too high. We can save 770 lines. (over 10%)
{code}
  private HostnameBasedLocalAddressProvider() {
-    LOG.log(Level.INFO, "Instantiating HostnameBasedLocalAddressProvider");
+    LOG.log(Level.FINE, "Instantiating HostnameBasedLocalAddressProvider");
  }
{code}

This PR will make it easy to review the test result.


> Delete or suppress verbose outputs in Unit Test
> -----------------------------------------------
>
>                 Key: REEF-850
>                 URL: https://issues.apache.org/jira/browse/REEF-850
>             Project: REEF
>          Issue Type: Task
>    Affects Versions: 0.13
>            Reporter: Dongjoon Hyun
>            Assignee: Dongjoon Hyun
>            Priority: Trivial
>
> `TestCombiner` generates about 1100 lines. It's a little bit debugging message since nobody examines those lines. (over 15%)
> {code}
> public void onNext(final Entry<Integer, Integer> value) {
> -  System.out.println(value.getKey() + "=" + value.getValue());
>   x.incrementAndGet();
> {code}
> `HostnameBasedLocalAddressProvider` generates meaningful messages but its level is too high. We can save 770 lines. (over 10%)
> {code}
>   private HostnameBasedLocalAddressProvider() {
> -    LOG.log(Level.INFO, "Instantiating HostnameBasedLocalAddressProvider");
> +    LOG.log(Level.FINE, "Instantiating HostnameBasedLocalAddressProvider");
>   }
> {code}
> This PR will make it easy to review the test result.
> For consistency, `LegacyLocalAddressProvider` should be changed, too.
> {code}
>   private LegacyLocalAddressProvider() {
> -    LOG.log(Level.INFO, "Instantiating LegacyLocalAddressProvider");
> +    LOG.log(Level.FINE, "Instantiating LegacyLocalAddressProvider");
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)