Bug 237469 - Avoid "System network proxy reloading failed!" warning from NbTestCase in NB JUnit
Avoid "System network proxy reloading failed!" warning from NbTestCase in NB ...
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Proxy
7.4
All All
: P3 with 1 vote (vote)
: 8.0
Assigned To: Libor Fischmeistr
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 11:16 UTC by Jiri Rechtacek
Modified: 2013-12-16 13:48 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2013-10-22 11:16:10 UTC
I'd like to enable "failOnMessage(Level.WARNING)" in my NbTestCase in my
platform application test, but in RELEASE74 there is one warning upon
platform startup that prevents me from doing this:

INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System
network proxy resolver: Mac
WARNING [org.netbeans.core.network.proxy.NetworkProxyReloader]: System
network proxy reloading failed! Trying fallback resolver.
INFO [org.netbeans.core.network.proxy.fallback.FallbackNetworkProxy]:
Fallback system proxy resolver: no http_proxy variable found
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System
network proxy reloading succeeded. Fallback provider was successful.


What seems to be happening is that NetBeans is trying to look up system
proxy settings while executing a unit test. That seems non-ideal, since
tests are supposed to be stable across platforms. What's the right way to
disable the proxy server for purposes of running unit tests--or more
generally, what is the right way to set NetBeans preferences in a unit
test?
Comment 1 Libor Fischmeistr 2013-11-19 13:56:49 UTC
This should fix it: http://hg.netbeans.org/core-main/rev/6c8473aefad0
Comment 2 Libor Fischmeistr 2013-11-19 13:58:33 UTC
http://wiki.netbeans.org/DevFaqNetBeansFullHack edited
Comment 3 Libor Fischmeistr 2013-11-19 14:33:39 UTC
Jirko, this may help you with the problem we discused (issue 234632)
Comment 4 ebakke 2013-11-19 20:11:44 UTC
Thank you!
Comment 5 Quality Engineering 2013-11-22 02:47:32 UTC
Integrated into 'main-silver', will be available in build *201311220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6c8473aefad0
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #237469: Avoid "System network proxy reloading failed!" warning from NbTestCase in NB JUnit
Comment 6 Jiri Skrivanek 2013-11-22 11:22:11 UTC
Does it mean that system proxy settings are ignored? In that case we need to set proxy a different way when testing update center, Maven projects etc.
Comment 7 Libor Fischmeistr 2013-11-22 12:44:43 UTC
(In reply to Jiri Skrivanek from comment #6)
> Does it mean that system proxy settings are ignored? In that case we need to
> set proxy a different way when testing update center, Maven projects etc.

It means that the default Java proxy selector is used. The NbProxySelector is not set up.
Comment 8 tombart 2013-12-16 12:26:23 UTC
How do I disable the System proxy check with project on maven?

WARNING [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: no suitable found, using fallback.
INFO [org.netbeans.core.network.proxy.fallback.FallbackNetworkProxy]: Fallback system proxy resolver: no http_proxy variable found
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: direct
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy: falled to default (corect if direct mode went before)
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.981 sec <<< FAILURE!
Comment 9 Jiri Rechtacek 2013-12-16 13:48:01 UTC
(In reply to tombart from comment #8)
> How do I disable the System proxy check with project on maven?

tombart, could you be more specific? Do you mean just logging or system network proxy detection in general? Thanks

> WARNING [org.netbeans.core.network.proxy.NetworkProxyReloader]: System
> network proxy resolver: no suitable found, using fallback.
> INFO [org.netbeans.core.network.proxy.fallback.FallbackNetworkProxy]:
> Fallback system proxy resolver: no http_proxy variable found
> INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network
> proxy reloading succeeded.
> INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network
> proxy - mode: direct
> INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network
> proxy: falled to default (corect if direct mode went before)
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.981 sec
> <<< FAILURE!


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo