From 70b9a7c5662b4e68dbbd647f31d765ec4dc34190 Mon Sep 17 00:00:00 2001 From: yangdsh Date: Mon, 25 May 2020 18:12:08 +0000 Subject: [PATCH] change test condition --- client/driver/fabfile.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/driver/fabfile.py b/client/driver/fabfile.py index cca9aff..2172cf9 100644 --- a/client/driver/fabfile.py +++ b/client/driver/fabfile.py @@ -1076,10 +1076,10 @@ def integration_tests(): # wait celery periodic task finishes assert wait_pipeline_data_ready(), "Pipeline data failed" - total_n = 30 - first_n = 5 + total_n = 20 last_n = 10 - average = 0 + + max_gain = 0 simulate_db_run(1, {'effective_cache_size': '0kB'}) for i in range(2, total_n + 2): LOG.info('Test GPR (gaussian process regression)') @@ -1088,12 +1088,12 @@ def integration_tests(): response = get_result(upload_code='ottertuneTestTuningGPR') assert response['status'] == 'good' gain = simulate_db_run(i, response['recommendation']) - if i < first_n + 2: - average += gain / first_n + if max_gain < gain: + max_gain = gain elif i > total_n - last_n + 2: - assert gain > average + assert gain > max_gain / 2.0 - average = 0 + max_gain = 0 simulate_db_run(1, {'effective_cache_size': '0kB'}) for i in range(2, total_n + 2): LOG.info('Test DNN (deep neural network)') @@ -1102,12 +1102,12 @@ def integration_tests(): response = get_result(upload_code='ottertuneTestTuningDNN') assert response['status'] == 'good' gain = simulate_db_run(i, response['recommendation']) - if i < first_n + 2: - average += gain / first_n + if max_gain < gain: + max_gain = gain elif i > total_n - last_n + 2: - assert gain > average + assert gain > max_gain / 2.0 - average = 0 + max_gain = 0 simulate_db_run(1, {'effective_cache_size': '0kB'}) for i in range(2, total_n + 2): upload_result(result_dir='./integrationTests/data/', prefix='x__', @@ -1115,10 +1115,10 @@ def integration_tests(): response = get_result(upload_code='ottertuneTestTuningDDPG') assert response['status'] == 'good' gain = simulate_db_run(i, response['recommendation']) - if i < first_n + 2: - average += gain / first_n + if max_gain < gain: + max_gain = gain elif i > total_n - last_n + 2: - assert gain > average + assert gain > max_gain / 2.0 LOG.info("\n\nIntegration Tests: PASSED!!\n")