From b2e037b4f760854f2ad3baed2fc84c3f4d275983 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Mon, 23 Oct 2023 23:23:58 +0300 Subject: [PATCH] Fix tests --- res/index_mapping_settings.json | 5 ++++- res/rp_aa_stats_mappings.json | 3 +++ test/mock_service.py | 5 +++-- test_res/fixtures/index_logs_rq.json | 2 +- test_res/fixtures/index_logs_rq_big_messages.json | 4 ++-- .../fixtures/index_logs_rq_big_messages_with_clusters.json | 4 ++-- test_res/fixtures/index_logs_rq_different_log_level.json | 2 +- .../fixtures/index_logs_rq_different_log_level_merged.json | 2 +- .../index_logs_rq_different_log_level_with_prefix.json | 2 +- test_res/fixtures/one_hit_search_rs.json | 1 + 10 files changed, 19 insertions(+), 11 deletions(-) diff --git a/res/index_mapping_settings.json b/res/index_mapping_settings.json index c86b9b4e..28d5c96c 100644 --- a/res/index_mapping_settings.json +++ b/res/index_mapping_settings.json @@ -93,8 +93,11 @@ "launch_name": { "type": "keyword" }, + "launch_number": { + "type": "integer" + }, "launch_id": { - "type": "keyword" + "type": "integer" }, "launch_start_time": { "type": "date", diff --git a/res/rp_aa_stats_mappings.json b/res/rp_aa_stats_mappings.json index 17d7b5a6..4e336672 100644 --- a/res/rp_aa_stats_mappings.json +++ b/res/rp_aa_stats_mappings.json @@ -15,6 +15,9 @@ "launch_name": { "type": "keyword" }, + "launch_number": { + "type": "integer" + }, "project_id": { "type": "keyword" }, diff --git a/test/mock_service.py b/test/mock_service.py index d8181b91..d0e0d42f 100644 --- a/test/mock_service.py +++ b/test/mock_service.py @@ -258,8 +258,9 @@ def _start_server(self, test_calls): @utils.ignore_warnings def shutdown_server(test_calls): """Shutdown server and test request calls""" - assert len(httpretty.latest_requests()) == len(test_calls) - for expected_test_call, test_call in zip(test_calls, httpretty.latest_requests()): + actual_calls = httpretty.latest_requests() + assert len(actual_calls) == len(test_calls) + for expected_test_call, test_call in zip(test_calls, actual_calls): assert expected_test_call["method"] == test_call.method assert expected_test_call["uri"] == test_call.path if "rq" in expected_test_call: diff --git a/test_res/fixtures/index_logs_rq.json b/test_res/fixtures/index_logs_rq.json index c47ce091..82aeebf5 100644 --- a/test_res/fixtures/index_logs_rq.json +++ b/test_res/fixtures/index_logs_rq.json @@ -1,2 +1,2 @@ {"index":{"_index":"idx2","_type":"log","_id":"1_m"}} -{"issue_type":"AB001","launch_name":"Launch 1","log_level":40000,"original_message_lines":1,"original_message_words_number":2,"message":"","test_item":1,"test_item_name":"first test","start_time":"2020-01-15 10:57:43","unique_id":"unique1","test_case_hash":-1126886180,"detected_message":"","detected_message_with_numbers":"","only_numbers":"12","merged_small_logs":"message http localhost admin java.lang.noclassdeffounderror","stacktrace":"","urls":"http localhost admin","paths":"","message_params":"","potential_status_codes":"","found_exceptions":"java.lang.noclassdeffounderror","found_exceptions_extended":"java.lang.noclassdeffounderror lang.noclassdeffounderror noclassdeffounderror","found_tests_and_methods":"","stacktrace_extended":"","message_extended":"","detected_message_extended":"","detected_message_without_params_extended":"message java.lang lang.noclassdeffounderror noclassdeffounderror","message_without_params_extended":"","message_without_params_and_brackets":"","detected_message_without_params_and_brackets":"","whole_message":"Message 12 \r\n java.lang lang.NoClassDefFoundError\r\n","is_merged":true} +{"issue_type":"AB001","launch_name":"Launch 1","launch_number":0,"log_level":40000,"original_message_lines":1,"original_message_words_number":2,"message":"","test_item":1,"test_item_name":"first test","start_time":"2020-01-15 10:57:43","unique_id":"unique1","test_case_hash":-1126886180,"detected_message":"","detected_message_with_numbers":"","only_numbers":"12","merged_small_logs":"message http localhost admin java.lang.noclassdeffounderror","stacktrace":"","urls":"http localhost admin","paths":"","message_params":"","potential_status_codes":"","found_exceptions":"java.lang.noclassdeffounderror","found_exceptions_extended":"java.lang.noclassdeffounderror lang.noclassdeffounderror noclassdeffounderror","found_tests_and_methods":"","stacktrace_extended":"","message_extended":"","detected_message_extended":"","detected_message_without_params_extended":"message java.lang lang.noclassdeffounderror noclassdeffounderror","message_without_params_extended":"","message_without_params_and_brackets":"","detected_message_without_params_and_brackets":"","whole_message":"Message 12 \r\n java.lang lang.NoClassDefFoundError\r\n","is_merged":true} diff --git a/test_res/fixtures/index_logs_rq_big_messages.json b/test_res/fixtures/index_logs_rq_big_messages.json index 08b8822d..46dc71f8 100644 --- a/test_res/fixtures/index_logs_rq_big_messages.json +++ b/test_res/fixtures/index_logs_rq_big_messages.json @@ -1,4 +1,4 @@ {"index":{"_index":"2","_id":1}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":5,"original_message_words_number":9,"message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","detected_message_with_numbers":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","stacktrace":"","only_numbers":"1 2 3","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"/src/prod/results.html","message_params":"prod_en","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","stacktrace_extended":"","message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":5,"original_message_words_number":9,"message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","detected_message_with_numbers":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","stacktrace":"","only_numbers":"1 2 3","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"/src/prod/results.html","message_params":"prod_en","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","stacktrace_extended":"","message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator"} {"index":{"_index":"2","_id":2}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":4,"original_message_words_number":7,"message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","detected_message_with_numbers":"Message 2 \r\n Message 4 \r\n Message 5 http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","stacktrace":"","only_numbers":"2 4 5","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 2 \r\n Message 4 \r\n Message 5 \r\n java.lang.NoClassDefFoundError \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"http:localhost/admin","paths":"","message_params":"","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","stacktrace_extended":"","message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":4,"original_message_words_number":7,"message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","detected_message_with_numbers":"Message 2 \r\n Message 4 \r\n Message 5 http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","stacktrace":"","only_numbers":"2 4 5","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 2 \r\n Message 4 \r\n Message 5 \r\n java.lang.NoClassDefFoundError \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"http:localhost/admin","paths":"","message_params":"","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","stacktrace_extended":"","message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError"} diff --git a/test_res/fixtures/index_logs_rq_big_messages_with_clusters.json b/test_res/fixtures/index_logs_rq_big_messages_with_clusters.json index 6367c7f9..d1aa4367 100644 --- a/test_res/fixtures/index_logs_rq_big_messages_with_clusters.json +++ b/test_res/fixtures/index_logs_rq_big_messages_with_clusters.json @@ -1,4 +1,4 @@ {"index":{"_index":"2","_id":1}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"2727777272727727721","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":5,"original_message_words_number":9,"message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","detected_message_with_numbers":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","stacktrace":"","only_numbers":"1 2 3","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":true,"urls":"","paths":"/src/prod/results.html","message_params":"prod_en","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","stacktrace_extended":"","message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"2727777272727727721","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":5,"original_message_words_number":9,"message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","detected_message_with_numbers":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \r","stacktrace":"","only_numbers":"1 2 3","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 1 \r\n Message 2 \r\n Message 3 'prod_en' \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":true,"urls":"","paths":"/src/prod/results.html","message_params":"prod_en","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","stacktrace_extended":"","message_extended":"Message \r\n Message 'prod_en' /src/prod/results.html \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator impl.MandatoryAttributesValidator MandatoryAttributesValidator ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError\r\n de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator"} {"index":{"_index":"2","_id":2}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":4,"original_message_words_number":7,"message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","detected_message_with_numbers":"Message 2 \r\n Message 4 \r\n Message 5 http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","stacktrace":"","only_numbers":"2 4 5","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 2 \r\n Message 4 \r\n Message 5 \r\n java.lang.NoClassDefFoundError \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"http:localhost/admin","paths":"","message_params":"","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","stacktrace_extended":"","message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":4,"original_message_words_number":7,"message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","detected_message_with_numbers":"Message 2 \r\n Message 4 \r\n Message 5 http : localhost/admin \r\n java.lang.NoClassDefFoundError\r","stacktrace":"","only_numbers":"2 4 5","found_exceptions":"java.lang.NoClassDefFoundError","whole_message":"Message 2 \r\n Message 4 \r\n Message 5 \r\n java.lang.NoClassDefFoundError \n ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"http:localhost/admin","paths":"","message_params":"","found_exceptions_extended":"java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError","detected_message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","detected_message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","stacktrace_extended":"","message_extended":"Message \r\n Message http : localhost/admin \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError \r","message_without_params_extended":"Message \r\n java.lang.NoClassDefFoundError lang.NoClassDefFoundError NoClassDefFoundError ","detected_message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError","message_without_params_and_brackets":"Message \r\n java.lang.NoClassDefFoundError"} diff --git a/test_res/fixtures/index_logs_rq_different_log_level.json b/test_res/fixtures/index_logs_rq_different_log_level.json index 91ed3532..6f25271e 100644 --- a/test_res/fixtures/index_logs_rq_different_log_level.json +++ b/test_res/fixtures/index_logs_rq_different_log_level.json @@ -1,2 +1,2 @@ {"index":{"_index":"2","_id":1}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":3,"original_message_words_number":8,"message":" Message \n java.lang.reflect.Method.invoke(Method.java : ) \n message error caused by exception","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":" Message \n message error caused by exception","detected_message_with_numbers":" Message 1 \n message error caused by exception","stacktrace":" java.lang.reflect.Method.invoke(Method.java : ) ","only_numbers":"1","found_exceptions":"","whole_message":"Message 1 \n message error caused by exception \n java.lang.reflect.Method.invoke(Method.java:) ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"","message_params":"","found_exceptions_extended":"","detected_message_extended":" Message \n message error caused by exception","detected_message_without_params_extended":"Message \n message error caused by exception","stacktrace_extended":" java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) ","message_extended":" Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","message_without_params_extended":"Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","detected_message_without_params_and_brackets":"Message \n message error caused by exception","message_without_params_and_brackets":"Message \n java.lang.reflect.Method.invoke \n message error caused by exception"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":3,"original_message_words_number":8,"message":" Message \n java.lang.reflect.Method.invoke(Method.java : ) \n message error caused by exception","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":" Message \n message error caused by exception","detected_message_with_numbers":" Message 1 \n message error caused by exception","stacktrace":" java.lang.reflect.Method.invoke(Method.java : ) ","only_numbers":"1","found_exceptions":"","whole_message":"Message 1 \n message error caused by exception \n java.lang.reflect.Method.invoke(Method.java:) ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"","message_params":"","found_exceptions_extended":"","detected_message_extended":" Message \n message error caused by exception","detected_message_without_params_extended":"Message \n message error caused by exception","stacktrace_extended":" java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) ","message_extended":" Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","message_without_params_extended":"Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","detected_message_without_params_and_brackets":"Message \n message error caused by exception","message_without_params_and_brackets":"Message \n java.lang.reflect.Method.invoke \n message error caused by exception"} diff --git a/test_res/fixtures/index_logs_rq_different_log_level_merged.json b/test_res/fixtures/index_logs_rq_different_log_level_merged.json index c47ce091..82aeebf5 100644 --- a/test_res/fixtures/index_logs_rq_different_log_level_merged.json +++ b/test_res/fixtures/index_logs_rq_different_log_level_merged.json @@ -1,2 +1,2 @@ {"index":{"_index":"idx2","_type":"log","_id":"1_m"}} -{"issue_type":"AB001","launch_name":"Launch 1","log_level":40000,"original_message_lines":1,"original_message_words_number":2,"message":"","test_item":1,"test_item_name":"first test","start_time":"2020-01-15 10:57:43","unique_id":"unique1","test_case_hash":-1126886180,"detected_message":"","detected_message_with_numbers":"","only_numbers":"12","merged_small_logs":"message http localhost admin java.lang.noclassdeffounderror","stacktrace":"","urls":"http localhost admin","paths":"","message_params":"","potential_status_codes":"","found_exceptions":"java.lang.noclassdeffounderror","found_exceptions_extended":"java.lang.noclassdeffounderror lang.noclassdeffounderror noclassdeffounderror","found_tests_and_methods":"","stacktrace_extended":"","message_extended":"","detected_message_extended":"","detected_message_without_params_extended":"message java.lang lang.noclassdeffounderror noclassdeffounderror","message_without_params_extended":"","message_without_params_and_brackets":"","detected_message_without_params_and_brackets":"","whole_message":"Message 12 \r\n java.lang lang.NoClassDefFoundError\r\n","is_merged":true} +{"issue_type":"AB001","launch_name":"Launch 1","launch_number":0,"log_level":40000,"original_message_lines":1,"original_message_words_number":2,"message":"","test_item":1,"test_item_name":"first test","start_time":"2020-01-15 10:57:43","unique_id":"unique1","test_case_hash":-1126886180,"detected_message":"","detected_message_with_numbers":"","only_numbers":"12","merged_small_logs":"message http localhost admin java.lang.noclassdeffounderror","stacktrace":"","urls":"http localhost admin","paths":"","message_params":"","potential_status_codes":"","found_exceptions":"java.lang.noclassdeffounderror","found_exceptions_extended":"java.lang.noclassdeffounderror lang.noclassdeffounderror noclassdeffounderror","found_tests_and_methods":"","stacktrace_extended":"","message_extended":"","detected_message_extended":"","detected_message_without_params_extended":"message java.lang lang.noclassdeffounderror noclassdeffounderror","message_without_params_extended":"","message_without_params_and_brackets":"","detected_message_without_params_and_brackets":"","whole_message":"Message 12 \r\n java.lang lang.NoClassDefFoundError\r\n","is_merged":true} diff --git a/test_res/fixtures/index_logs_rq_different_log_level_with_prefix.json b/test_res/fixtures/index_logs_rq_different_log_level_with_prefix.json index 61d3f87e..3dfaf418 100644 --- a/test_res/fixtures/index_logs_rq_different_log_level_with_prefix.json +++ b/test_res/fixtures/index_logs_rq_different_log_level_with_prefix.json @@ -1,2 +1,2 @@ {"index":{"_index":"rp_2","_id":1}} -{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":3,"original_message_words_number":8,"message":" Message \n java.lang.reflect.Method.invoke(Method.java : ) \n message error caused by exception","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":" Message \n message error caused by exception","detected_message_with_numbers":" Message 1 \n message error caused by exception","stacktrace":" java.lang.reflect.Method.invoke(Method.java : ) ","only_numbers":"1","found_exceptions":"","whole_message":"Message 1 \n message error caused by exception \n java.lang.reflect.Method.invoke(Method.java:) ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"","message_params":"","found_exceptions_extended":"","detected_message_extended":" Message \n message error caused by exception","detected_message_without_params_extended":"Message \n message error caused by exception","stacktrace_extended":" java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) ","message_extended":" Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","message_without_params_extended":"Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","detected_message_without_params_and_brackets":"Message \n message error caused by exception","message_without_params_and_brackets":"Message \n java.lang.reflect.Method.invoke \n message error caused by exception"} +{"launch_id":1234567892,"launch_name":"Launch with test items with logs","launch_number":0,"launch_start_time":"2020-01-15 10:57:43","test_item":1,"test_item_name":"first test","unique_id":"unique1","cluster_id":"0","cluster_message":"","test_case_hash":-1126886180,"is_auto_analyzed":false,"issue_type":"ti001","log_time":"2020-01-15 10:57:43","log_level":40000,"original_message_lines":3,"original_message_words_number":8,"message":" Message \n java.lang.reflect.Method.invoke(Method.java : ) \n message error caused by exception","is_merged":false,"start_time":"2020-01-15 10:57:43","merged_small_logs":"","detected_message":" Message \n message error caused by exception","detected_message_with_numbers":" Message 1 \n message error caused by exception","stacktrace":" java.lang.reflect.Method.invoke(Method.java : ) ","only_numbers":"1","found_exceptions":"","whole_message":"Message 1 \n message error caused by exception \n java.lang.reflect.Method.invoke(Method.java:) ","potential_status_codes":"","found_tests_and_methods":"","cluster_with_numbers":false,"urls":"","paths":"","message_params":"","found_exceptions_extended":"","detected_message_extended":" Message \n message error caused by exception","detected_message_without_params_extended":"Message \n message error caused by exception","stacktrace_extended":" java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) ","message_extended":" Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","message_without_params_extended":"Message \n java.lang.reflect.Method.invoke Method.invoke invoke (Method.java : ) \n message error caused by exception","detected_message_without_params_and_brackets":"Message \n message error caused by exception","message_without_params_and_brackets":"Message \n java.lang.reflect.Method.invoke \n message error caused by exception"} diff --git a/test_res/fixtures/one_hit_search_rs.json b/test_res/fixtures/one_hit_search_rs.json index d5bc859d..0497bb86 100644 --- a/test_res/fixtures/one_hit_search_rs.json +++ b/test_res/fixtures/one_hit_search_rs.json @@ -22,6 +22,7 @@ "_source": { "issue_type": "AB001", "launch_name": "Launch 1", + "launch_number": 0, "log_level": 40000, "original_message_lines": 1, "original_message_words_number": 2,