Skip to content

Conversation

mashhurs
Copy link
Collaborator

@mashhurs mashhurs commented Jun 25, 2025

A better proposal then 75bef16 commit:

diff --git a/.ci/logstash-run.sh b/.ci/logstash-run.sh
index 23f92042a..22e4ea622 100755
--- a/.ci/logstash-run.sh
+++ b/.ci/logstash-run.sh
@@ -27,6 +27,7 @@ bundle exec rake prepare_geoip_resources
 
 if [[ "$INTEGRATION" != "true" ]]; then
   bundle exec rspec --format=documentation spec/unit --tag ~integration --tag ~secure_integration
+  bundle exec rake java_test
 else
 
   if [[ "$SECURE_INTEGRATION" == "true" ]]; then
diff --git a/Rakefile b/Rakefile
index 58824d84a..710bd50ad 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,19 +1,13 @@
 require 'logstash/devutils/rake'
 
-task :install_jars do
+task :vendor do
   sh('./gradlew clean vendor')
 end
+
 task :prepare_geoip_resources do
   sh('./gradlew geoipTestResources')
 end
 
-task :vendor => :install_jars
-
-task :test do
-  require 'rspec'
-  require 'rspec/core/runner'
-  Rake::Task[:install_jars].invoke
-  Rake::Task[:generate_ssl].invoke
-  sh './gradlew test'
-  exit(RSpec::Core::Runner.run(Rake::FileList['spec/**/*_spec.rb']))
+task :java_test do
+  sh('./gradlew test')
 end
\ No newline at end of file

Copy link

mergify bot commented Jun 25, 2025

This pull request does not have a backport label. Could you fix it @mashhurs? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

@mashhurs mashhurs mentioned this pull request Jun 25, 2025
@mashhurs mashhurs added backport-9.0 Automated backport to the 9.0 branch with mergify backport-8.x Deprecated. 8.x branch does not exist backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches labels Jun 25, 2025
robbavey
robbavey previously approved these changes Jun 25, 2025
Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 26, 2025

@mashhurs mashhurs requested a review from robbavey June 26, 2025 21:32
Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM

@mashhurs mashhurs merged commit f190c72 into elastic:main Jun 26, 2025
3 of 4 checks passed
@mashhurs mashhurs deleted the fix-java-unit-tests branch June 26, 2025 21:39
@mashhurs
Copy link
Collaborator Author

@Mergifyio backport 9.1

Copy link
Contributor

@Mergifyio backport 8.17 8.18 8.19

Copy link

mergify bot commented Jun 26, 2025

backport 9.1

✅ Backports have been created

Copy link

mergify bot commented Jun 26, 2025

mergify bot pushed a commit that referenced this pull request Jun 26, 2025
* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)
mergify bot pushed a commit that referenced this pull request Jun 26, 2025
* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)
mergify bot pushed a commit that referenced this pull request Jun 26, 2025
* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)
mergify bot pushed a commit that referenced this pull request Jun 26, 2025
* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)
mergify bot pushed a commit that referenced this pull request Jun 26, 2025
* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)
mashhurs added a commit that referenced this pull request Jun 26, 2025
…311)

* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)

Co-authored-by: Mashhur <[email protected]>
mashhurs added a commit that referenced this pull request Jun 26, 2025
…315)

* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)

Co-authored-by: Mashhur <[email protected]>
mashhurs added a commit that referenced this pull request Jun 26, 2025
…312)

* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)

Co-authored-by: Mashhur <[email protected]>
mashhurs added a commit that referenced this pull request Jun 26, 2025
…313)

* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)

Co-authored-by: Mashhur <[email protected]>
mashhurs added a commit that referenced this pull request Jun 26, 2025
…314)

* Run Java tests in unit test CIs.

(cherry picked from commit f190c72)

Co-authored-by: Mashhur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.x Deprecated. 8.x branch does not exist backport-9.0 Automated backport to the 9.0 branch with mergify backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java unit tests not running in CIs.

3 participants