Peter Bacsko created YUNIKORN-2666:
--------------------------------------

             Summary: Fix DeepEqual comparison in Test_fixedRule_ruleDAO 
                 Key: YUNIKORN-2666
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2666
             Project: Apache YuniKorn
          Issue Type: Bug
          Components: core - scheduler, test - unit
            Reporter: Peter Bacsko


The test case {{Test_fixedRule_ruleDAO/filter}} can randomly fail due to the 
non-deterministic nature of map key iteration:

{noformat}
fixed_rule_test.go:285: assertion failed: 
            --- tt.want
            +++ ruleDAO
              &dao.RuleDAO{
                Name:       "fixed",
                Parameters: {"create": "true", "qualified": "false", "queue": 
"default"},
                Filter: &dao.FilterDAO{
                        Type:     "allow",
                        UserList: nil,
                        GroupList: []string{
            -                   "group1",
            +                   "group2",
            -                   "group2",
            +                   "group1",
                        },
                        UserExp:  "",
                        GroupExp: "",
                },
                ParentRule: nil,
              }
{noformat}

We use {{maps.Keys()}} when we create the user list and group list in 
{{FilterDAO}}. 



--
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