Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.3.0, 2.4.0, 3.0.0
-
None
Description
For even an unrelated change sometimes the YarnSchedulerBackendSuite#"RequestExecutors reflects node blacklist and is serializable" test fails with the following error:
Error Message org.mockito.exceptions.misusing.WrongTypeOfReturnValue: EmptySet$ cannot be returned by resourceOffers() resourceOffers() should return Seq *** 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. Stacktrace sbt.ForkMain$ForkError: org.mockito.exceptions.misusing.WrongTypeOfReturnValue: EmptySet$ cannot be returned by resourceOffers() resourceOffers() should return Seq *** 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.