Peter Bacsko created YUNIKORN-2971:
--------------------------------------

             Summary: Remove recorder type check from test cases
                 Key: YUNIKORN-2971
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2971
             Project: Apache YuniKorn
          Issue Type: Bug
          Components: shim - kubernetes, test - unit
            Reporter: Peter Bacsko
            Assignee: Peter Bacsko


Certain test cases in the shim verify the type of the event recorder:

{noformat}
        recorder, ok := events.GetRecorder().(*k8sEvents.FakeRecorder)
        if !ok {
                t.Fatal("the EventRecorder is expected to be of type 
FakeRecorder")
        }
{noformat}

However, this just happens to pass by accident because a previous test modified 
it from MockedRecorder to FakeRecorder. Running such tests individually fails.

Also make sure that all tests restore the recorder properly in a deferred code 
section.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to