Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0582-observer-test-Try-make-sure-observer-not-r...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0582-observer-test-Try-make-sure-observer-not-running.patch of Package erlang
From f19f77fa50e1ebea22336ea44aa9ecb8156c0771 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 23 Nov 2022 16:11:08 +0100 Subject: [PATCH 2/3] [observer|test] Try make sure observer not running At the end of test case 'basic' (end_per_testcase), try ensure that *if* test case failed, that observer is not running. --- lib/observer/test/observer_SUITE.erl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl index 266f612029..2fa47503fc 100644 --- a/lib/observer/test/observer_SUITE.erl +++ b/lib/observer/test/observer_SUITE.erl @@ -80,11 +80,31 @@ init_per_testcase(Case, Config) -> Dog = test_server:timetrap(?default_timeout), [{watchdog, Dog} | Config]. +end_per_testcase(basic = Case, Config) -> + ?P("end_per_testcase(~w) -> entry with" + "~n Config: ~p", [Case, Config]), + case lists:keysearch(tc_status, 1, Config) of + {value, {tc_status, ok}} -> + ?P("end_per_testcase(~w) -> successful", [Case]), + ok; + {value, _} -> + ?P("end_per_testcase(~w) -> try ensure observer stopped", [Case]), + ensure_observer_stopped(); + _ -> + ?P("end_per_testcase(~w) -> nop status", [Case]), + ok + end, + end_per_testcase2(Case, Config); end_per_testcase(Case, Config) -> ?P("end_per_testcase(~w) -> entry with" "~n Config: ~p", [Case, Config]), + end_per_testcase2(Case, Config). + +end_per_testcase2(Case, Config) -> + ?P("end_per_testcase2(~w) -> entry - try cancel watchdog", [Case]), Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), + ?P("end_per_testcase2(~w) -> done", [Case]), ok. @@ -142,11 +162,11 @@ app_file(Config) when is_list(Config) -> ?line ok = test_server:app_test(observer), ok. + %% Testing .appup file appup_file(Config) when is_list(Config) -> ok = test_server:appup_test(observer). --define(DBG(Foo), io:format("~p: ~p~n",[?LINE, catch Foo])). basic(suite) -> []; basic(doc) -> [""]; -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor