Skip to content

Commit f190c72

Browse files
authored
Fix failed Java test and run Java unit test while compiling. (#306)
* Run Java tests in unit test CIs.
1 parent a005e94 commit f190c72

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.ci/logstash-run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bundle exec rake prepare_geoip_resources
2727

2828
if [[ "$INTEGRATION" != "true" ]]; then
2929
bundle exec rspec --format=documentation spec/unit --tag ~integration --tag ~secure_integration
30+
bundle exec rake java_test
3031
else
3132

3233
if [[ "$SECURE_INTEGRATION" == "true" ]]; then

Rakefile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
require 'logstash/devutils/rake'
22

3-
task :install_jars do
3+
task :vendor do
44
sh('./gradlew clean vendor')
55
end
6+
67
task :prepare_geoip_resources do
78
sh('./gradlew geoipTestResources')
89
end
910

10-
task :vendor => :install_jars
11-
12-
task :test do
13-
require 'rspec'
14-
require 'rspec/core/runner'
15-
Rake::Task[:install_jars].invoke
16-
Rake::Task[:generate_ssl].invoke
17-
sh './gradlew test'
18-
exit(RSpec::Core::Runner.run(Rake::FileList['spec/**/*_spec.rb']))
11+
task :java_test do
12+
sh('./gradlew test')
1913
end

0 commit comments

Comments
 (0)