Skip to content

Java: add integration test for failed Gradle download #19047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Mar 17, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings March 17, 2025 22:25
@smowton smowton requested a review from a team as a code owner March 17, 2025 22:25
@github-actions github-actions bot added the Java label Mar 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an integration test to simulate a failed Gradle download. The changes include the addition of a sample Java application with a greeting method, a unit test to verify the greeting, and a Python-based integration test that overrides the Gradle executable to simulate failure.

Reviewed Changes

Copilot reviewed 3 out of 9 changed files in this pull request and generated no comments.

File Description
java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/src/main/java/com/example/App.java Introduces a simple Java application with a greeting method
java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/src/test/java/com/example/AppTest.java Adds a unit test to verify that the application returns a non-null greeting
java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/test.py Implements a Python integration test to simulate a Gradle download failure
Files not reviewed (6)
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/.gitattributes: Language not supported
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/.gitignore: Language not supported
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/build.gradle: Language not supported
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/diagnostics.expected: Language not supported
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/settings.gradle: Language not supported
  • java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/source_archive.expected: Language not supported
Comments suppressed due to low confidence (1)

java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/test.py:17

  • The integration test does not assert the outcome of the simulated Gradle failure. Add an assertion to verify that the expected failure behavior is triggered.
    codeql.database.create(build_mode = "none")

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@smowton smowton force-pushed the smowton/admin/add-gradle-download-failure-test branch from 3f3a204 to 834594f Compare March 18, 2025 15:21
@smowton smowton merged commit 839e4b2 into github:main Mar 18, 2025
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants