address Bohan's comment

This commit is contained in:
yangdsh 2020-05-25 16:02:43 +00:00 committed by Dana Van Aken
parent a0089cccdf
commit c9d3642e6a
2 changed files with 7 additions and 2 deletions

View File

@ -1068,7 +1068,7 @@ def integration_tests():
# periodic tasks haven't ran, lhs result returns. # periodic tasks haven't ran, lhs result returns.
LOG.info('Test no pipeline data, LHS returned') LOG.info('Test no pipeline data, LHS returned')
upload_result(result_dir='./integrationTests/data/', prefix='0__', upload_result(result_dir='./integrationTests/data/', prefix='1__',
upload_code='ottertuneTestTuningGPR') upload_code='ottertuneTestTuningGPR')
response = get_result(upload_code='ottertuneTestTuningGPR') response = get_result(upload_code='ottertuneTestTuningGPR')
assert response['status'] == 'lhs' assert response['status'] == 'lhs'
@ -1119,3 +1119,8 @@ def integration_tests():
average += gain / first_n average += gain / first_n
elif i > total_n - last_n + 2: elif i > total_n - last_n + 2:
assert gain > average assert gain > average
LOG.info("\n\nIntegration Tests: PASSED!!\n")
# Test task status UI
task_status_ui_test()

View File

@ -1784,7 +1784,7 @@ def alt_create_or_edit_session(request):
@csrf_exempt @csrf_exempt
def pipeline_data_ready(request): # pylint: disable=unused-argument def pipeline_data_ready(request): # pylint: disable=unused-argument
LOG.debug("Latest pipeline run: %s", PipelineRun.objects.get_latest()) LOG.debug("Latest pipeline run: %s", PipelineRun.objects.get_latest())
newest_result = Result.objects.filter().order_by('-pk')[0] newest_result = Result.objects.order_by('-pk')[0]
pipeline_data = PipelineData.objects.filter(workload=newest_result.workload).order_by('-pk') pipeline_data = PipelineData.objects.filter(workload=newest_result.workload).order_by('-pk')
if pipeline_data.exists() and pipeline_data[0].pipeline_run.end_time is not None: if pipeline_data.exists() and pipeline_data[0].pipeline_run.end_time is not None:
response = "Pipeline data ready: True" response = "Pipeline data ready: True"