8000 Removed `time_in_suite`, `time_in_context`, `time_in_test` as they ar… · utPLSQL/utPLSQL@99bae42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99bae42

Browse files
committed
Removed time_in_suite, time_in_context, time_in_test as they are of low value and could bing confusion.
1 parent f5fa468 commit 99bae42

File tree

3 files changed

+3
-45
lines changed

3 files changed

+3
-45
lines changed

source/core/session_context/ut_session_info.tpb

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,16 @@ create or replace type body ut_session_info as
4242
member procedure before_calling_suite(self in out nocopy ut_session_info, a_suite in ut_logical_suite) is
4343
begin
4444
if a_suite is not of (ut_suite_context) then
45-
suite_start_time := a_suite.start_time;
4645
ut_session_context.set_context( 'suite_path', a_suite.path );
4746
ut_session_context.set_context( 'suite_package', a_suite.object_owner||'.'||a_suite.object_name );
4847
ut_session_context.set_context( 'suite_description', a_suite.description );
49-
ut_session_context.set_context( 'suite_start_time', ut_utils.to_string(suite_start_time) );
48+
ut_session_context.set_context( 'suite_start_time', ut_utils.to_string(a_suite.start_time) );
5049
dbms_application_info.set_module( 'utPLSQL', a_suite.object_name );
5150
else
52-
context_start_time := a_suite.start_time;
5351
ut_session_context.set_context( 'context_name', a_suite.name );
5452
ut_session_context.set_context( 'context_path', a_suite.path);
5553
ut_session_context.set_context( 'context_description', a_suite.description );
56-
ut_session_context.set_context( 'context_start_time', ut_utils.to_string(context_start_time) );
54+
ut_session_context.set_context( 'context_start_time', ut_utils.to_string(a_suite.start_time) );
5755
end if;
5856
end;
5957

@@ -64,34 +62,27 @@ create or replace type body ut_session_info as
6462
ut_session_context.clear_context( 'suite_path' );
6563
ut_session_context.clear_context( 'suite_description' );
6664
ut_session_context.clear_context( 'suite_start_time' );
67-
ut_session_context.clear_context( 'time_in_suite' );
68-
suite_start_time := null;
6965
else
7066
ut_session_context.clear_context( 'context_name' );
7167
ut_session_context.clear_context( 'context_path' );
7268
ut_session_context.clear_context( 'context_description' );
7369
ut_session_context.clear_context( 'context_start_time' );
74-
ut_session_context.clear_context( 'time_in_context' );
75-
context_start_time := null;
7670
end if;
7771
end;
7872

7973

8074
member procedure before_calling_test(self in out nocopy ut_session_info, a_test in ut_test) is
8175
begin
82-
test_start_time := a_test.start_time;
8376
ut_session_context.set_context( 'test_name', a_test.object_owner||'.'||a_test.object_name||'.'||a_test.name );
8477
ut_session_context.set_context( 'test_description', a_test.description );
85-
ut_session_context.set_context( 'test_start_time', ut_utils.to_string(test_start_time) );
78+
ut_session_context.set_context( 'test_start_time', ut_utils.to_string(a_test.start_time) );
8679
end;
8780

8881
member procedure after_calling_test (self in out nocopy ut_session_info, a_test in ut_test) is
8982
begin
9083
ut_session_context.clear_context( 'test_name' );
9184
ut_session_context.clear_context( 'test_description' );
9285
ut_session_context.clear_context( 'test_start_time' );
93-
ut_session_context.clear_context( 'time_in_test' );
94-
test_start_time := null;
9586
end;
9687

9788
member procedure before_calling_executable(self in out nocopy ut_session_info, a_executable in ut_executable) is
@@ -102,15 +93,6 @@ create or replace type body ut_session_info as
10293
a_executable.owner_name||'.'||a_executable.object_name||'.'||a_executable.procedure_name
10394
);
10495
dbms_application_info.set_client_info( a_executable.procedure_name );
105-
if suite_start_time is not null then
106-
ut_session_context.set_context( 'time_in_suite', current_timestamp - suite_start_time );
107-
if context_start_time is not null then
108-
ut_session_context.set_context( 'time_in_context', current_timestamp - context_start_time );
109-
end if;
110-
if test_start_time is not null then
111-
ut_session_context.set_context( 'time_in_test', current_timestamp - test_start_time );
112-
end if;
113-
end if;
11496
end;
11597

11698
member procedure after_calling_executable(self in out nocopy ut_session_info, a_executable in ut_executable) is

source/core/session_context/ut_session_info.tps

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ create or replace type ut_session_info under ut_event_listener (
1919
module varchar2(4000),
2020
action varchar2(4000),
2121
client_info varchar2(4000),
22-
suite_start_time timestamp,
23-
context_start_time timestamp,
24-
test_start_time timestamp,
2522
constructor function ut_session_info(self in out nocopy ut_session_info) return self as result,
2623

2724
member procedure before_calling_run(self in out nocopy ut_session_info, a_run in ut_run),

test/ut3_user/api/test_ut_run.pkb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,6 @@ Failures:%
11641164
||'%BEFORE_SUITE:SUITE_PACKAGE='||gc_owner||'.check_context'
11651165
||'%BEFORE_SUITE:SUITE_PATH=some.suite.path.check_context'
11661166
||'%BEFORE_SUITE:SUITE_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1167-
||'%BEFORE_SUITE:TIME_IN_SUITE=+000000000 00:00:0'
11681167
||'%APPLICATION_INFO:MODULE=utPLSQL'
11691168
||'%APPLICATION_INFO:ACTION=check_context'
11701169
||'%APPLICATION_INFO:CLIENT_INFO=before_suite%'
@@ -1187,8 +1186,6 @@ Failures:%
11871186
||'%BEFORE_CONTEXT:SUITE_PACKAGE='||gc_owner||'.check_context'
11881187
||'%BEFORE_CONTEXT:SUITE_PATH=some.suite.path.check_context'
11891188
||'%BEFORE_CONTEXT:SUITE_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1190-
||'%BEFORE_CONTEXT:TIME_IN_CONTEXT=+000000000 00:00:0'
1191-
||'%BEFORE_CONTEXT:TIME_IN_SUITE=+000000000 00:00:0'
11921189
||'%APPLICATION_INFO:MODULE=utPLSQL'
11931190
||'%APPLICATION_INFO:ACTION=check_context'
11941191
||'%APPLICATION_INFO:CLIENT_INFO=before_context%'
@@ -1213,9 +1210,6 @@ Failures:%
12131210
||'%BEFORE_EACH_TEST:TEST_DESCRIPTION=Some test description'
12141211
||'%BEFORE_EACH_TEST:TEST_NAME='||gc_owner||'.check_context.the_test'
12151212
||'%BEFORE_EACH_TEST:TEST_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1216-
||'%BEFORE_EACH_TEST:TIME_IN_CONTEXT=+000000000 00:00:0%'
1217-
||'%BEFORE_EACH_TEST:TIME_IN_SUITE=+000000000 00:00:0%'
1218-
||'%BEFORE_EACH_TEST:TIME_IN_TEST=+000000000 00:00:0%'
12191213
||'%APPLICATION_INFO:MODULE=utPLSQL'
12201214
||'%APPLICATION_INFO:ACTION=check_context'
12211215
||'%APPLICATION_INFO:CLIENT_INFO=before_each_test%'
@@ -1239,9 +1233,6 @@ Failures:%
12391233
||'%BEFORE_TEST:TEST_DESCRIPTION=Some test description'
12401234
||'%BEFORE_TEST:TEST_NAME='||gc_owner||'.check_context.the_test'
12411235
||'%BEFORE_TEST:TEST_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1242-
||'%BEFORE_TEST:TIME_IN_CONTEXT=+000000000 00:00:0%'
1243-
||'%BEFORE_TEST:TIME_IN_SUITE=+000000000 00:00:0%'
1244-
||'%BEFORE_TEST:TIME_IN_TEST=+000000000 00:00:0%'
12451236
||'%APPLICATION_INFO:MODULE=utPLSQL'
12461237
||'%APPLICATION_INFO:ACTION=check_context'
12471238
||'%APPLICATION_INFO:CLIENT_INFO=before_test%'
@@ -1265,9 +1256,6 @@ Failures:%
12651256
||'%THE_TEST:TEST_DESCRIPTION=Some test description'
12661257
||'%THE_TEST:TEST_NAME='||gc_owner||'.check_context.the_test'
12671258
||'%THE_TEST:TEST_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1268-
||'%THE_TEST:TIME_IN_CONTEXT=+000000000 00:00:0%'
1269-
||'%THE_TEST:TIME_IN_SUITE=+000000000 00:00:0%'
1270-
||'%THE_TEST:TIME_IN_TEST=+000000000 00:00:0%'
12711259
||'%APPLICATION_INFO:MODULE=utPLSQL'
12721260
||'%APPLICATION_INFO:ACTION=check_context'
12731261
||'%APPLICATION_INFO:CLIENT_INFO=the_test%'
@@ -1291,9 +1279,6 @@ Failures:%
12911279
||'%AFTER_TEST:TEST_DESCRIPTION=Some test description'
12921280
||'%AFTER_TEST:TEST_NAME='||gc_owner||'.check_context.the_test'
12931281
||'%AFTER_TEST:TEST_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1294-
||'%AFTER_TEST:TIME_IN_CONTEXT=+000000000 00:00:0%'
1295-
||'%AFTER_TEST:TIME_IN_SUITE=+000000000 00:00:0%'
1296-
||'%AFTER_TEST:TIME_IN_TEST=+000000000 00:00:0%'
12971282
||'%APPLICATION_INFO:MODULE=utPLSQL'
12981283
||'%APPLICATION_INFO:ACTION=check_context'
12991284
||'%APPLICATION_INFO:CLIENT_INFO=after_test%'
@@ -1317,9 +1302,6 @@ Failures:%
13171302
||'%AFTER_EACH_TEST:TEST_DESCRIPTION=Some test description'
13181303
||'%AFTER_EACH_TEST:TEST_NAME='||gc_owner||'.check_context.the_test'
13191304
||'%AFTER_EACH_TEST:TEST_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1320-
||'%AFTER_EACH_TEST:TIME_IN_CONTEXT=+000000000 00:00:0%'
1321-
||'%AFTER_EACH_TEST:TIME_IN_SUITE=+000000000 00:00:0%'
1322-
||'%AFTER_EACH_TEST:TIME_IN_TEST=+000000000 00:00:0%'
13231305
||'%APPLICATION_INFO:MODULE=utPLSQL'
13241306
||'%APPLICATION_INFO:ACTION=check_context'
13251307
||'%APPLICATION_INFO:CLIENT_INFO=after_each_test%'
@@ -1340,8 +1322,6 @@ Failures:%
13401322
||'%AFTER_CONTEXT:SUITE_PACKAGE='||gc_owner||'.check_context'
13411323
||'%AFTER_CONTEXT:SUITE_PATH=some.suite.path.check_context'
13421324
||'%AFTER_CONTEXT:SUITE_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1343-
||'%AFTER_CONTEXT:TIME_IN_CONTEXT=+000000000 00:00:0%'
1344-
||'%AFTER_CONTEXT:TIME_IN_SUITE=+000000000 00:00:0%'
13451325
||'%APPLICATION_INFO:MODULE=utPLSQL'
13461326
||'%APPLICATION_INFO:ACTION=check_context'
13471327
||'%APPLICATION_INFO:CLIENT_INFO=after_context%'
@@ -1359,7 +1339,6 @@ Failures:%
13591339
||'%AFTER_SUITE:SUITE_PACKAGE='||gc_owner||'.check_context'
13601340
||'%AFTER_SUITE:SUITE_PATH=some.suite.path.check_context'
13611341
||'%AFTER_SUITE:SUITE_START_TIME='||to_char(current_timestamp,'yyyy-mm-dd"T"hh24:mi')
1362-
||'%AFTER_SUITE:TIME_IN_SUITE=+000000000 00:00:0%'
13631342
||'%APPLICATION_INFO:MODULE=utPLSQL'
13641343
||'%APPLICATION_INFO:ACTION=check_context'
13651344
||'%APPLICATION_INFO:CLIENT_INFO=after_suite%'

0 commit comments

Comments
 (0)
0