jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: Exception while trying to open help
Date Mon, 29 Jan 2018 14:56:45 GMT
Hello,
As this feature is useful during scripting, and I think your test
configuration is "exotic":-) (I think for a high percentage of users, it is
not done with X11 forwarding ssh session)

   - My preferred solution is : display a warning when the browser doesn't
   start in OpenLinkAction (when opening help, only?)

Keep Browser opening the default


Regards

On Mon, Jan 29, 2018 at 12:00 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

>
>
> Am 29. Januar 2018 11:23:42 MEZ schrieb Philippe Mouawad <
> philippe.mouawad@gmail.com>:
> >Ok for me regarding your solution
>
> Which one exactly?
>
> >
> >On Mon, Jan 29, 2018 at 11:16 AM, Felix Schumacher <
> >felix.schumacher@internetallee.de> wrote:
> >
> >> Am 29.01.2018 10:57, schrieb Felix Schumacher:
> >>
> >>> Am 29.01.2018 10:34, schrieb Philippe Mouawad:
> >>>
> >>>> Hi Felix,
> >>>> I reckon I didn't test such "complex" setup :-)
> >>>>
> >>>> Do you think we should support such use case ?
> >>>>
> >>>
> >>> Well, I like to use it :)
> >>>
> >>> I think it would be enough to check for the
> >>> UnsupportedOperationException and switch to local help.
> >>>
> >>> Or reverse the logic. Check for !USE_LOCAL_HELP and try to
> >initialize
> >>> the external browser.
> >>> Surround that with a catch UOE and log a warning (show a dialog
> >about
> >>> setting the property).
> >>> Return early on success and otherwise fallback to the old logic.
> >>>
> >>> Something like this:
> >>>
> >>> if (!USE_LOCAL_HELP) {
> >>>   try {
> >>>     // init external browser
> >>>     ...
> >>>     return; // successful init
> >>>   } catch (UnsupportedOperationException e) {
> >>>     log.warn("set help.local=true");
> >>>   }
> >>> }
> >>>
> >>> // use local browser
> >>> ...
> >>> return;
> >>>
> >>
> >> Seems like this will not work. The UOE is caught by OpenLinkAction.
> >> If we rethrow the UOE, it will get caught by ActionRouter :( I
> >haven't
> >> gone further.
> >>
> >> So to support the exception getting not caught, we would have to
> >decide in
> >> OpenLinkAction, if this is a call for external help browser and then
> >throw
> >> a custom exception which we could route through ActionRouter and
> >catch in
> >> Help.
> >>
> >> Seems a bit complex. The alternatives are:
> >>
> >> * set help.local to true as default (revert to old behaviour)
> >> * display a warning when the browser doesn't start in OpenLinkAction
> >(when
> >> opening help, only?)
> >>
> >> On a slightly different topic:
> >> In OpenLinkAction there are a few log errors. The format strings have
> >a
> >> paramter "{}", but no parameter is given to the log statement. The
> >> exception as last parameter does not count.
> >> I think we should add "url" to the log statements.
> >>
> >> Felix
> >>
> >>
> >>
> >>>
> >>> Felix
> >>>
> >>>
> >>>> Regards
> >>>>
> >>>> On Mon, Jan 29, 2018 at 10:28 AM, Felix Schumacher <
> >>>> felix.schumacher@internetallee.de> wrote:
> >>>>
> >>>> Hi all,
> >>>>>
> >>>>> while testing the current trunk I noticed the following exception
> >when
> >>>>> trying to open help:
> >>>>>
> >>>>> 2018-01-29 10:20:59,280 ERROR o.a.j.g.a.OpenLinkAction:
> >OpenLinkAction:
> >>>>> Current platform does not support the Desktop.Action.BROWSE
> >actionon {}
> >>>>> java.lang.UnsupportedOperationException: The BROWSE action is not
> >>>>> supported on the current platform!
> >>>>>         at java.awt.Desktop.checkActionSupport(Desktop.java:225)
> >>>>> ~[?:1.8.0_162]
> >>>>>         at java.awt.Desktop.browse(Desktop.java:381)
> >~[?:1.8.0_162]
> >>>>>         at
> >org.apache.jmeter.gui.action.OpenLinkAction.doAction(OpenLin
> >>>>> kAction.java:71)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >org.apache.jmeter.gui.action.ActionRouter.performAction(Acti
> >>>>> onRouter.java:88)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >org.apache.jmeter.gui.action.ActionRouter.doActionNow(Action
> >>>>> Router.java:125)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >org.apache.jmeter.gui.action.Help.doAction(Help.java:115)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >org.apache.jmeter.gui.action.ActionRouter.performAction(Acti
> >>>>> onRouter.java:88)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerfo
> >>>>> rmed$0(ActionRouter.java:70)
> >>>>> ~[ApacheJMeter_core.jar:4.0-SNAPSHOT.20180129]
> >>>>>         at
> >java.awt.event.InvocationEvent.dispatch(InvocationEvent.
> >>>>> java:311)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
> >>>>> [?:1.8.0_162]
> >>>>>         at java.awt.EventQueue.access$500(EventQueue.java:97)
> >>>>> [?:1.8.0_162]
> >>>>>         at java.awt.EventQueue$3.run(EventQueue.java:709)
> >[?:1.8.0_162]
> >>>>>         at java.awt.EventQueue$3.run(EventQueue.java:703)
> >[?:1.8.0_162]
> >>>>>         at java.security.AccessController.doPrivileged(Native
> >Method)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.security.ProtectionDomain$JavaSecurityAccessImpl.doInte
> >>>>> rsectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_162]
> >>>>>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.pumpOneEventForFilters(EventDis
> >>>>> patchThread.java:205)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.pumpEventsForFilter(EventDispat
> >>>>> chThread.java:116)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis
> >>>>> patchThread.java:105)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
> >>>>> java:101)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.
> >>>>> java:93)
> >>>>> [?:1.8.0_162]
> >>>>>         at
> >java.awt.EventDispatchThread.run(EventDispatchThread.java:82
> >>>>> )
> >>>>> [?:1.8.0_162]
> >>>>>
> >>>>> Setting help.local=true works (using the built-in help browser).
> >>>>>
> >>>>> The system is a Leap 42.3 used remotely with a X11 forwarding ssh
> >>>>> session.
> >>>>>
> >>>>> Regards,
> >>>>>  Felix
> >>>>>
> >>>>>
>



-- 
Cordialement.
Philippe Mouawad.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message