- interactive session should not gc-ed if session timeout check is off *** FAILED *** (61 milliseconds)
org.mockito.exceptions.misusing.WrongTypeOfReturnValue: Recovering cannot be returned by heartbeatExpired()
heartbeatExpired() should return boolean
***
If you're unsure why you're getting above error read on.
Due to the nature of the syntax above problem might occur because:
1. This exception *might* occur in wrongly written multi-threaded tests.
Please refer to Mockito FAQ on limitations of concurrency testing.
2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies -
- with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method.
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1.com$cloudera$livy$sessions$SessionManagerSpec$$anonfun$$changeStateAndCheck$1(SessionManagerSpec.scala:86)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1$$anonfun$com$cloudera$livy$sessions$SessionManagerSpec$$anonfun$$testSessionGC$1$1.apply(SessionManagerSpec.scala:98)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1$$anonfun$com$cloudera$livy$sessions$SessionManagerSpec$$anonfun$$testSessionGC$1$1.apply(SessionManagerSpec.scala:92)
at scala.collection.immutable.List.foreach(List.scala:318)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1.com$cloudera$livy$sessions$SessionManagerSpec$$anonfun$$testSessionGC$1(SessionManagerSpec.scala:92)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5.apply$mcV$sp(SessionManagerSpec.scala:80)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5.apply(SessionManagerSpec.scala:70)
at com.cloudera.livy.sessions.SessionManagerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5.apply(SessionManagerSpec.scala:70)
at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
...