You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/11 11:57:00 UTC

[jira] [Updated] (SPARK-58709) Use assert(!x) instead of assert(x === false) in SecurityManagerSuite

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