Skip to content

Conversation

@titusfortner
Copy link
Member

@titusfortner titusfortner commented Dec 21, 2025

User description

🔗 Related Issues

Fixes broken tests from #16765


PR Type

Bug fix


Description


Diagram Walkthrough

flowchart LR
  A["Broken Tests<br/>PR #16765"] -->|"Missing Dependency"| B["AssertJ Core<br/>Artifact"]
  B -->|"Added to"| C["environment<br/>BUILD.bazel"]
  B -->|"Added to"| D["testing<br/>BUILD.bazel"]
  C -->|"Fixes"| E["Test Execution"]
  D -->|"Fixes"| E
Loading

File Walkthrough

Relevant files
Bug fix
BUILD.bazel
Add AssertJ dependency to test-base target                             

java/test/org/openqa/selenium/environment/BUILD.bazel

  • Added missing artifact("org.assertj:assertj-core") dependency to
    test-base target
  • Resolves compilation/runtime failures in AppServerTestBase tests
+1/-0     
BUILD.bazel
Add AssertJ dependency to SmallTests target                           

java/test/org/openqa/selenium/testing/BUILD.bazel

  • Added missing artifact("org.assertj:assertj-core") dependency to
    SmallTests target
  • Resolves compilation/runtime failures in IgnoreComparatorUnitTest
+1/-0     

@selenium-ci selenium-ci added C-java Java Bindings B-build Includes scripting, bazel and CI integrations labels Dec 21, 2025
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟡
🎫 #1234
🔴 Ensure that calling click() on a link with javascript: in its href triggers the JavaScript
(regression in Selenium 2.48 on Firefox 42 compared to 2.47.1).
Provide a fix (or change) so the referenced test case alerts again when clicked in the
affected environment (Firefox 42, Selenium 2.48.x).
🟡
🎫 #5678
🔴 Fix or explain the repeated ChromeDriver instantiation issue that produces Error:
ConnectFailure (Connection refused) on subsequent instances (Ubuntu 16.04.4, Selenium
3.9.0, Chrome 65, ChromeDriver 2.35).
Ensure multiple ChromeDriver instances can be created without connection-refused errors in
the described environment.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Contributor

@asolntsev asolntsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@titusfortner Thank you for the fix!

P.S. In a standard Gradle or Maven project, this problem would never happen ;)

@asolntsev asolntsev added this to the 4.40.0 milestone Dec 21, 2025
@titusfortner
Copy link
Member Author

Right, other problems would happen. I appreciate your help fixing up places in the code that need it, but it's not helpful to complain about choices that have made that aren't going to change.

In this case the CI displayed the error message unable to build all targets, and listed above the 4 targets that didn't build; running the target locally said exactly what needed to be changed.

@asolntsev
Copy link
Contributor

In this case the CI displayed the error message unable to build all targets, and listed above the 4 targets that didn't build; running the target locally said exactly what needed to be changed.

My bad, next time I will ask for help if I cannot find the right error message.

Right, other problems would happen.

No. No. No. Sorry, I don't buy this argument.
In a de-facto standard tools have less problems. All known issues are already solved. Or at least well-known.

While people don't like the chosen, not-so-standard, not-so-widely-used tool, you will hear complains. It seems totally logical to me ;)

@titusfortner
Copy link
Member Author

Right, but complaining isn't going to change anything, it only makes you look bad and everyone else frustrated/exhausted. I get that bazel isn't the preferred solution for most people seeing it for the first time, but it has some significant benefits beyond what the more common java build systems provide (feel free to research them), and we simply aren't going to redo everything we have based on someone complaining one more time about it. 😄

@titusfortner titusfortner merged commit 875f5f5 into trunk Dec 21, 2025
24 checks passed
@titusfortner titusfortner deleted the fix_java branch December 21, 2025 23:07
@asolntsev
Copy link
Contributor

@titusfortner Yes, this sounds totally reasonable. I agree.
But believe me, I am not the first one, and I am not the last one. It will be the endless story. :(

@titusfortner
Copy link
Member Author

Be part of the solution not part of the problem 😉

Also, Simon wrote about some of the advantages of Bazel here: https://www.selenium.dev/blog/2023/building-selenium/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations C-java Java Bindings Review effort 1/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants