You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/17 10:21:00 UTC
[jira] [Resolved] (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 ]
Uroš Bojanić resolved SPARK-58709.
----------------------------------
Fix Version/s: 4.3.0
Resolution: Fixed
Issue resolved by pull request 57927
[https://github.com/apache/spark/pull/57927]
> 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ć
> Assignee: Uroš Bojanić
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> 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