[
https://issues.apache.org/jira/browse/SPARK-58709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SPARK-58709:
-----------------------------------
Labels: pull-request-available (was: )
> Use assert(!x) instead of assert(x === false) in SecurityManagerSuite
> ---------------------------------------------------------------------
>
> Key: SPARK-58709
> URL: https://issues.apache.org/jira/browse/SPARK-58709
> Project: Spark
> Issue Type: Test
> Components: Spark Core
> Affects Versions: 4.3.0
> Reporter: Uroš Bojanić
> Priority: Major
> Labels: pull-request-available
>
> SecurityManagerSuite compares boolean results against false, as in
> assert(securityManager.checkUIViewPermissions("user3") === false). All three
> receivers (checkUIViewPermissions, checkModifyPermissions, aclsEnabled)
> return a Scala Boolean, so the comparison adds nothing.
> This rewrites the 19 occurrences in the first six tests to the negated form.
> Besides being shorter, the negated form produces a better failure message:
> ScalaTest reconstructs the source expression, so a failure reports the
> offending call and its argument rather than the anonymous "true did not equal
> false".
> Test-only, with identical truth values. The remaining occurrences in the
> later tests are left for a follow-up to keep the diff reviewable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]