Skip to content

Commit

Permalink
[HWORKS-571] Run more integration tests in parallel (#1423) (#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
robzor92 authored Oct 12, 2023
1 parent 7f644f9 commit 520fecc
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 180 deletions.
1 change: 0 additions & 1 deletion hopsworks-IT/src/test/ruby/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ REMOTE_SSH_USER=vagrant # Username of password-less sudo user
REMOTE_SSH_PASSWORD=vagrant # Password of user to SSH into machines
REMOTE_SSH_PORT=22 # Port sshd listens on VMs
PYTHON_VERSION=3.10
FAST=true
SPARK_EXAMPLE_VERSION="2.12-3.1.1.5"

# Only if local
Expand Down
16 changes: 5 additions & 11 deletions hopsworks-IT/src/test/ruby/isolated_tests
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
users_spec.rb
variables_spec.rb
agent_spec.rb
admin_hosts_spec.rb
audit_spec.rb
conda_spec.rb
experiment_spec.rb
execution_spec.rb
execution_kube_spec.rb
ee_epipe_spec.rb
ee_search_spec.rb
ee_tags_spec.rb
epipe_spec.rb
projects_spec.rb
ee_epipe_spec.rb
prov_ops_spec.rb
prov_state_spec.rb
search_spec.rb
users_spec.rb
docker_image_spec.rb
serving_spec.rb
model_spec.rb
job_alert_spec.rb
job_kube_spec.rb
job_spec.rb
projects_spec.rb
31 changes: 1 addition & 30 deletions hopsworks-IT/src/test/ruby/spec/execution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

describe "On #{ENV['OS']}" do
before :all do
@max_executions_per_job = getVar('executions_per_job_limit').value
@debugOpt=false
# Enable the reporting
RSpec.configure do |c|
Expand All @@ -40,12 +39,8 @@
job_types.each do |type|
context 'with authentication and executable ' + type do
before :all do
setVar('executions_per_job_limit', '2')
with_valid_tour_project("spark")
end
after :all do
setVar('executions_per_job_limit', @max_executions_per_job)
end
after :each do
clean_jobs(@project[:id])
end
Expand Down Expand Up @@ -186,18 +181,14 @@ def run_job_and_get_logs(project, job_name)
end
end
end
describe 'execution extended', if: ENV['FAST'].eql?("false") do
describe 'execution extended' do
context 'create' do
job_types = ['jar', 'py', 'ipynb']
job_types.each do |type|
context 'with authentication and executable ' + type do
before :all do
setVar('executions_per_job_limit', '2')
with_valid_tour_project("spark")
end
after :all do
setVar('executions_per_job_limit', @max_executions_per_job)
end
after :each do
clean_jobs(@project[:id])
end
Expand Down Expand Up @@ -640,26 +631,6 @@ def run_job_and_get_logs(project, job_name)
create_sparktour_job(@project, "quota5", 'jar')
run_execution(@project[:id], "quota5")
end
describe "#parallel executions" do
before :all do
setVar("quotas_max_parallel_executions", "1")
@cookies_pe = with_admin_session
with_valid_tour_project("spark")
end
after :all do
setVar("quotas_max_parallel_executions", "-1")
@cookies_pe = nil
end
it "should not launch more than configured max parallel executions" do
create_sparktour_job(@project, "max_parallel_exec", "jar")
start_execution(@project[:id], "max_parallel_exec")

# reached limit
resp = start_execution(@project[:id], "max_parallel_exec", expected_status: 400)
parsed = JSON.parse(resp)
expect(parsed['usrMsg']).to include("quota")
end
end
end
describe '#access' do
before :all do
Expand Down
18 changes: 0 additions & 18 deletions hopsworks-IT/src/test/ruby/spec/experiment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
@debugOpt = false

# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
wait_on_command_search(repeat: 30)
epipe_wait_on_mutations(repeat: 30)
Expand All @@ -39,23 +38,6 @@

describe 'experiment' do

context 'with data science profile not enabled' do
before :all do
# disable data science profile
setVar('enable_data_science_profile', "false")
with_valid_project
end

after :all do
setVar('enable_data_science_profile', "true")
end

it "should fail to get experiments" do
get_experiment(@project[:id], "app_id_4252123_1", nil)
expect_status_details(400, error_code: 120012)
end
end

context 'without authentication' do
before :all do
with_valid_project
Expand Down
2 changes: 1 addition & 1 deletion hopsworks-IT/src/test/ruby/spec/jupyter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
end
end

describe "Jupyter extended", if: ENV['FAST'].eql?("false") do
describe "Jupyter extended" do
remote_fs_drivers = ["hdfscontentsmanager", "hopsfsmount"]
remote_fs_drivers.each do |driver|
describe "with jupyter remote filesystem driver: #{driver}" do
Expand Down
20 changes: 0 additions & 20 deletions hopsworks-IT/src/test/ruby/spec/model_registry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,14 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "model_registry")
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe 'model registry' do

context 'with data science profile not enabled' do
before :all do
# disable data science profile
setVar('enable_data_science_profile', "false")
with_valid_project
end

after :all do
setVar('enable_data_science_profile', "true")
end

it "should fail to get model registries" do
get_model_registries(@project[:id], nil)
expect_status_details(400, error_code: 120012)
end
end

context 'without authentication' do
before :all do
with_valid_project
Expand Down
21 changes: 0 additions & 21 deletions hopsworks-IT/src/test/ruby/spec/model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
@cleanup = true

# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
wait_on_command_search(repeat: 30)
epipe_wait_on_mutations(repeat: 30)
Expand All @@ -40,26 +39,6 @@

describe 'model' do

context 'with data science profile not enabled' do
before :all do
# disable data science profile
setVar('enable_data_science_profile', "false")

with_valid_project
end

after :all do
setVar('enable_data_science_profile', "true")
end

it "should fail to get models" do
get_models(@project[:id], nil)
expect_status_details(400, error_code: 120012)
get_model(@project[:id], "mnist_1")
expect_status_details(400, error_code: 120012)
end
end

context 'without authentication' do
before :all do
with_valid_project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_default_sklearn_inference")
purge_all_sklearn_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe 'inference' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_default_sklearn")
purge_all_sklearn_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe 'sklearn_serving' do
Expand Down
2 changes: 0 additions & 2 deletions hopsworks-IT/src/test/ruby/spec/serving_default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_default")
purge_all_tf_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe "#create" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_default_tensorflow_inference")
purge_all_tf_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe 'inference' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_default_tensorflow")
purge_all_tf_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

describe "#create" do
Expand Down
2 changes: 0 additions & 2 deletions hopsworks-IT/src/test/ruby/spec/serving_inference_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@

before :all do
# ensure data science profile is enabled
@enable_data_science_profile = getVar('enable_data_science_profile')
setVar('enable_data_science_profile', "true")
end

after :all do
clean_all_test_projects(spec: "serving_inference")
purge_all_tf_serving_instances
setVar('enable_data_science_profile', @enable_data_science_profile[:value])
end

let(:test_data) {[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
Expand Down
Loading

0 comments on commit 520fecc

Please sign in to comment.