Jochen Kemnade created GROOVY-8115:
--------------------------------------

             Summary: Reported start time for timed-out executions is sometimes 
wrong
                 Key: GROOVY-8115
                 URL: https://issues.apache.org/jira/browse/GROOVY-8115
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.9
            Reporter: Jochen Kemnade


Sorry for the somewhat fuzzy report, i haven't been able to find out what 
exactly causes the error.
Consider the following script:
{code:java}
def c = new GroovyClassLoader().parseClass('''
    import groovy.transform.TimedInterrupt
    import groovy.util.NodeBuilder

    @TimedInterrupt(checkOnMethodStart = false, value = 1L)
    class MyClass {
      def myMethod() {
        def b = new NodeBuilder()
        b.foo {
          while(true){

          }
        }
      }
      def getProperty(String name){ null }

    }
''')
    
c.newInstance().myMethod()
{code}
If I run it, the execution is correctly aborted after a second. The error 
message states: 
{{Execution timed out after 1 units. Start time: null}}.
If I don't override {{getProperty}}, the error message is {{Execution timed out 
after 1 units. Start time: Thu Mar 09 14:35:55 CET 2017}}.
Something is wrong with the access to the start time field in 
{{TimedInterruptibleASTTransformation.createInterruptStatement}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to