You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2024/06/06 12:55:00 UTC

[jira] [Created] (YUNIKORN-2666) Fix DeepEqual comparison in Test_fixedRule_ruleDAO

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: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org