aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosEventDomain
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cosEventDomain')
-rw-r--r--lib/cosEventDomain/doc/src/notes.xml20
-rw-r--r--lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl24
-rw-r--r--lib/cosEventDomain/src/cosEventDomainApp.erl13
-rw-r--r--lib/cosEventDomain/test/Makefile3
-rw-r--r--lib/cosEventDomain/test/cosEventDomain.cover2
-rw-r--r--lib/cosEventDomain/test/cosEventDomain.spec20
-rw-r--r--lib/cosEventDomain/test/event_domain_SUITE.erl39
-rw-r--r--lib/cosEventDomain/test/generated_SUITE.erl51
-rw-r--r--lib/cosEventDomain/vsn.mk4
9 files changed, 114 insertions, 62 deletions
diff --git a/lib/cosEventDomain/doc/src/notes.xml b/lib/cosEventDomain/doc/src/notes.xml
index deb1985c86..522dcea829 100644
--- a/lib/cosEventDomain/doc/src/notes.xml
+++ b/lib/cosEventDomain/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2001</year><year>2010</year>
+ <year>2001</year><year>2011</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -32,7 +32,24 @@
</header>
<section>
+ <title>cosEventDomain 1.1.10</title>
+
+ <section>
+ <title>Improvements and New Features</title>
+ <list type="bulleted">
+ <item>
+ <p>
+ Eliminated Dialyzer warnings when using exit or throw.</p>
+ <p>
+ Own Id: OTP-9050 Aux Id:</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
<title>cosEventDomain 1.1.9</title>
+
<section>
<title>Improvements and New Features</title>
<list type="bulleted">
@@ -44,7 +61,6 @@
</item>
</list>
</section>
-
</section>
<section>
diff --git a/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl b/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl
index 0b73100540..f5dd6d5c14 100644
--- a/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl
+++ b/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -778,12 +778,17 @@ get_qos(_OE_This, #state{cyclic = Cyclic, diamonds = Diamonds} = State) ->
%%----------------------------------------------------------------------
set_qos(_OE_This, State, NewQoS) ->
QoS = cosEventDomainApp:get_qos(NewQoS),
- set_qos_helper(QoS, State, []).
+ case set_qos_helper(QoS, State, []) of
+ {ok, NewState} ->
+ {reply, ok, NewState};
+ {error, Errors} ->
+ corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors})
+ end.
set_qos_helper([], State, []) ->
- {reply, ok, State};
+ {ok, State}; %{reply, ok, State};
set_qos_helper([], _, Errors) ->
- corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors});
+ {error, Errors};
set_qos_helper([{?DiamondDetection, Diamonds}|T], #state{diamonds = Diamonds} = State,
Errors) ->
set_qos_helper(T, State, Errors);
@@ -828,12 +833,17 @@ set_qos_helper([{?CycleDetection, _}|T], #state{cyclic = Cyclic} = State, Errors
%%----------------------------------------------------------------------
validate_qos(_OE_This, State, WantedQoS) ->
QoS = cosEventDomainApp:get_qos(WantedQoS),
- {reply, {ok, validate_qos_helper(QoS, State, [], [])}, State}.
+ case validate_qos_helper(QoS, State, [], []) of
+ {ok, Properties} ->
+ {reply, {ok, Properties}, State};
+ {error, Errors} ->
+ corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors})
+ end.
validate_qos_helper([], _, Properties, []) ->
- Properties;
+ {ok, Properties};
validate_qos_helper([], _, _, Errors) ->
- corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors});
+ {error, Errors};
validate_qos_helper([{?DiamondDetection, ?ForbidDiamonds}|T], State, Properties,
Errors) ->
case get_diamonds_helper(State, false) of
diff --git a/lib/cosEventDomain/src/cosEventDomainApp.erl b/lib/cosEventDomain/src/cosEventDomainApp.erl
index d57f51443c..734e4deccb 100644
--- a/lib/cosEventDomain/src/cosEventDomainApp.erl
+++ b/lib/cosEventDomain/src/cosEventDomainApp.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -270,12 +270,17 @@ create_id() ->
get_qos([]) ->
[];
get_qos(Properties) ->
- get_qos(Properties, [], []).
+ case get_qos(Properties, [], []) of
+ {ok, Supported} ->
+ Supported;
+ {error, Unsupported} ->
+ corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Unsupported})
+ end.
get_qos([], Supported, []) ->
- Supported;
+ {ok, Supported};
get_qos([], _, Unsupported) ->
- corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Unsupported});
+ {error, Unsupported};
get_qos([#'CosNotification_Property'{name = ?CycleDetection,
value= #any{value = ?AuthorizeCycles}}|T],
Supported, Unsupported) ->
diff --git a/lib/cosEventDomain/test/Makefile b/lib/cosEventDomain/test/Makefile
index 9893b05b8c..5b53690c6b 100644
--- a/lib/cosEventDomain/test/Makefile
+++ b/lib/cosEventDomain/test/Makefile
@@ -34,6 +34,7 @@ RELSYSDIR = $(RELEASE_PATH)/cosEventDomain_test
# Target Specs
# ----------------------------------------------------
TEST_SPEC_FILE = cosEventDomain.spec
+COVER_FILE = cosEventDomain.cover
MODULES = \
@@ -99,6 +100,6 @@ release_docs_spec:
release_tests_spec: tests
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(TEST_SPEC_FILE) \
- $(ERL_FILES) $(RELSYSDIR)
+ $(COVER_FILE) $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(SUITE_TARGET_FILES) $(RELSYSDIR)
diff --git a/lib/cosEventDomain/test/cosEventDomain.cover b/lib/cosEventDomain/test/cosEventDomain.cover
new file mode 100644
index 0000000000..f87f6d97bf
--- /dev/null
+++ b/lib/cosEventDomain/test/cosEventDomain.cover
@@ -0,0 +1,2 @@
+{incl_app,cosEventDomain,details}.
+
diff --git a/lib/cosEventDomain/test/cosEventDomain.spec b/lib/cosEventDomain/test/cosEventDomain.spec
index 0d3e307071..bcee74c5f1 100644
--- a/lib/cosEventDomain/test/cosEventDomain.spec
+++ b/lib/cosEventDomain/test/cosEventDomain.spec
@@ -1,19 +1 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
-{topcase, {dir, "../cosEventDomain_test"}}.
+{suites,"../cosEventDomain_test",all}.
diff --git a/lib/cosEventDomain/test/event_domain_SUITE.erl b/lib/cosEventDomain/test/event_domain_SUITE.erl
index ddf0af3489..2793f94639 100644
--- a/lib/cosEventDomain/test/event_domain_SUITE.erl
+++ b/lib/cosEventDomain/test/event_domain_SUITE.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -22,7 +22,7 @@
-module(event_domain_SUITE).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-include_lib("orber/include/corba.hrl").
-include_lib("cosNotification/include/CosNotifyChannelAdmin.hrl").
-include_lib("cosNotification/include/CosNotification.hrl").
@@ -56,20 +56,31 @@
%%-----------------------------------------------------------------
%% External exports
%%-----------------------------------------------------------------
--export([all/1, event_domain_api/1, event_domain_factory_api/1,
- cases/0, init_all/1, finish_all/1,
- init_per_testcase/2, fin_per_testcase/2, app_test/1]).
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
+ event_domain_api/1, event_domain_factory_api/1,
+ cases/0, init_per_suite/1, end_per_suite/1,
+ init_per_testcase/2, end_per_testcase/2, app_test/1]).
%%-----------------------------------------------------------------
%% Internal exports
%%-----------------------------------------------------------------
-all(doc) -> ["API tests for the cosEventDomain interfaces", ""];
-all(suite) -> {req,
- [mnesia, orber, cosNotification],
- {conf, init_all, cases(), finish_all}}.
-
-cases() ->
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ cases().
+
+groups() ->
+ [].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+cases() ->
[event_domain_api, event_domain_factory_api, app_test].
%%-----------------------------------------------------------------
@@ -81,12 +92,12 @@ init_per_testcase(_Case, Config) ->
[{watchdog, Dog}|Config].
-fin_per_testcase(_Case, Config) ->
+end_per_testcase(_Case, Config) ->
Dog = ?config(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
-init_all(Config) when is_list(Config) ->
+init_per_suite(Config) when is_list(Config) ->
mnesia:delete_schema([node()]),
mnesia:create_schema([node()]),
ok = corba:orb_init([{flags, 16#02},
@@ -102,7 +113,7 @@ init_all(Config) when is_list(Config) ->
cosEventDomainApp:start(),
Config.
-finish_all(Config) when is_list(Config) ->
+end_per_suite(Config) when is_list(Config) ->
cosEventDomainApp:stop(),
cosEventDomainApp:uninstall(),
cosNotificationApp:stop(),
diff --git a/lib/cosEventDomain/test/generated_SUITE.erl b/lib/cosEventDomain/test/generated_SUITE.erl
index 6c6996ca79..575568a7b9 100644
--- a/lib/cosEventDomain/test/generated_SUITE.erl
+++ b/lib/cosEventDomain/test/generated_SUITE.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
-module(generated_SUITE).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
-include_lib("orber/include/corba.hrl").
-define(default_timeout, ?t:minutes(3)).
@@ -71,12 +71,11 @@
%%-----------------------------------------------------------------
%% External exports
%%-----------------------------------------------------------------
--export([all/1]).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2]).
%%-----------------------------------------------------------------
%% Internal exports
%%-----------------------------------------------------------------
--export([]).
-compile(export_all).
%%-----------------------------------------------------------------
@@ -84,17 +83,41 @@
%% Args:
%% Returns:
%%-----------------------------------------------------------------
-all(doc) -> ["This suite is for testing IC generated files"];
-all(suite) ->
- ['CosEventDomainAdmin', 'CosEventDomainAdmin_DiamondSeq',
- 'CosEventDomainAdmin_AlreadyExists', 'CosEventDomainAdmin_DomainIDSeq',
- 'CosEventDomainAdmin_Connection', 'CosEventDomainAdmin_ConnectionIDSeq',
- 'CosEventDomainAdmin_ConnectionNotFound', 'CosEventDomainAdmin_CycleCreationForbidden',
- 'CosEventDomainAdmin_CycleSeq', 'CosEventDomainAdmin_DiamondCreationForbidden',
- 'CosEventDomainAdmin_DomainNotFound', 'CosEventDomainAdmin_MemberIDSeq',
- 'CosEventDomainAdmin_RouteSeq', 'CosEventDomainAdmin_EventDomainFactory',
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ ['CosEventDomainAdmin',
+ 'CosEventDomainAdmin_DiamondSeq',
+ 'CosEventDomainAdmin_AlreadyExists',
+ 'CosEventDomainAdmin_DomainIDSeq',
+ 'CosEventDomainAdmin_Connection',
+ 'CosEventDomainAdmin_ConnectionIDSeq',
+ 'CosEventDomainAdmin_ConnectionNotFound',
+ 'CosEventDomainAdmin_CycleCreationForbidden',
+ 'CosEventDomainAdmin_CycleSeq',
+ 'CosEventDomainAdmin_DiamondCreationForbidden',
+ 'CosEventDomainAdmin_DomainNotFound',
+ 'CosEventDomainAdmin_MemberIDSeq',
+ 'CosEventDomainAdmin_RouteSeq',
+ 'CosEventDomainAdmin_EventDomainFactory',
'CosEventDomainAdmin_EventDomain'].
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
@@ -103,7 +126,7 @@ init_per_testcase(_Case, Config) ->
[{watchdog, Dog}|Config].
-fin_per_testcase(_Case, Config) ->
+end_per_testcase(_Case, Config) ->
Dog = ?config(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
diff --git a/lib/cosEventDomain/vsn.mk b/lib/cosEventDomain/vsn.mk
index bd21133fe5..f4a77ab7a8 100644
--- a/lib/cosEventDomain/vsn.mk
+++ b/lib/cosEventDomain/vsn.mk
@@ -1 +1,3 @@
-COSEVENTDOMAIN_VSN = 1.1.9
+
+COSEVENTDOMAIN_VSN = 1.1.10
+