-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_4111_rt_ack_unack_max_fields.sh
executable file
·67 lines (47 loc) · 2.66 KB
/
test_4111_rt_ack_unack_max_fields.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
. $(cd $(dirname $0) ; pwd)/harness/lib_bootstrap.sh || ( echo "ERROR: Cannot bootstrap" ; exit 1 )
test_case_begin "Upward acknowledgment: acknowledge and unacknowledge"
test_case_goal "Check that productB can translate and forward upward acknowledgment events from EMS"
test_case_type "Main functionality"
test_case_when "$HAS_UP_ACK"
test_case_fails_execute "https://jira-pro.its.example.com:8443/browse/CMSVTP-6781 - Event Time discrepancy between clear and acknowledge"
test_case_fails_execute "https://jira-pro.its.example.com:8443/browse/CMSVTP-6780 - AHFM does not propagate Acknowledgement User Identifier and Acknowledgement Time Stamp in 3GPP alarms"
phase "Preparation"
flow_prepare
phase "Verification"
annotate_action "Run notify domain to collect troubleshooting information"
echo -e "notify domain $default_domain \n spawn sleep 6000" | sudo -i -u $platform_user $usr_opt_platform/bin/manage &
notify_pid=$!
register_pid $notify_pid
annotate_action "Set productB to flow tracing to collect troubleshooting information"
set_productB_platform_processing_trace_for_current_process
annotate_action "Remember ProductB java log file size"
start_log_size=$(get_file_size "$productB_log_java")
annotate_action "Create backup copy of productB log4j configuration file"
user=$platform_user backup_file "/var/opt/Platform/conf/$PRODUCTB_NAME/cst/log4j2.properties"
annotate_action "Configure productB log4j to trace incoming alarms"
as_platform_admin perl -W -pe 's!logger.transport.level=.*!logger.transport.level=trace!' -i "/var/opt/Platform/conf/$PRODUCTB_NAME/cst/log4j2.properties"
#Uncomment if you need to debug why no traces, otherwise it pollutes test log
#print_file "/var/opt/Platform/conf/$PRODUCTB_NAME/cst/log4j2.properties"
wait_for_condition "tail -c +$start_log_size $productB_log_java | grep \"Tracing was reconfigured\""
annotate_action "Dump productB java log file to collect troubleshooting information"
tail -f -c +$start_log_size "$productB_log_java" &
tail2_pid=$!
register_pid $tail2_pid
annotate_action "Dump productB trace file to collect troubleshooting information"
tail -f -c +$(get_file_size "$productB_log_platform") "$productB_log_platform" &
tail_pid=$!
register_pid $tail_pid
run_simulator
phase "Cleanup"
annotate_action "Restore original productB log4j configuration file"
user=$platform_user restore_file "/var/opt/Platform/conf/$PRODUCTB_NAME/cst/log4j2.properties"
annotate_action "Stop productB java log dumping"
kill_pid $tail2_pid
annotate_action "Stop productB log dumping"
kill_pid $tail_pid
set_productB_platform_production_trace_for_current_process
annotate_action "Stop notify domain"
kill_pid $notify_pid
flow_cleanup
test_case_end