JBehave
  1. JBehave
  2. JBEHAVE-927

Disable Timeout in debuggingmode

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      It should be the default behavior in debugging mode to disable the timeout.

      A first POC-Implementation can be reviewed in branch NoTimeoutInDebugMode in the fork git://github.com/picpromusic/jbehave-core.git

      Or via browser here:
      https://github.com/picpromusic/jbehave-core/tree/NoTimeoutInDebugMode

      A Diff can be viewed here:
      https://github.com/picpromusic/jbehave-core/compare/master...NoTimeoutInDebugMode

        Activity

        Hide
        Mauro Talevi added a comment -

        A couple of comments:

        • you're making some specific assumptions on what constitute debug mode:
          private boolean inDebug() {
                  String string = ManagementFactory.getRuntimeMXBean()
                          .getInputArguments().toString();
                  return string.indexOf("agentlib:jdwp") > 0;
          } 
          
        • Isn't it simpler to just manually set a long timeout, ultimately to Long.MAX_VALUE?
        Show
        Mauro Talevi added a comment - A couple of comments: you're making some specific assumptions on what constitute debug mode: private boolean inDebug() { String string = ManagementFactory.getRuntimeMXBean() .getInputArguments().toString(); return string.indexOf( "agentlib:jdwp" ) > 0; } Isn't it simpler to just manually set a long timeout, ultimately to Long.MAX_VALUE?
        Hide
        Sebastian Sickelmann added a comment -

        The specific assumption should work (at least for the ibm-jvm and sun-jvm since version 5)
        http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/conninv.html#Invocation
        http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzaha%2Fjpdebuga.htm

        Yes i can manually set timeout to MAX_VALUE but it's a "trick" which i usually implement
        to support the "not so smart part(Mr. Hyde)" inside me. Normally i implement this
        trick in a smart moment(Dr. Jekyll) with the foreseen that i(Mr.Hyde) missed the
        change and check MAX_VALUE into version control and head-up the build-server/test-server
        in the datacenter during nightly-build/test.

        Show
        Sebastian Sickelmann added a comment - The specific assumption should work (at least for the ibm-jvm and sun-jvm since version 5) http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/conninv.html#Invocation http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzaha%2Fjpdebuga.htm Yes i can manually set timeout to MAX_VALUE but it's a "trick" which i usually implement to support the "not so smart part(Mr. Hyde)" inside me. Normally i implement this trick in a smart moment(Dr. Jekyll) with the foreseen that i(Mr.Hyde) missed the change and check MAX_VALUE into version control and head-up the build-server/test-server in the datacenter during nightly-build/test.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sebastian Sickelmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: