From 22698424dbc6efec84d71234b60290b3937f2f28 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 20 Sep 2012 15:11:33 +0200 Subject: Fix bug where require of same name at same config would return name in use --- lib/common_test/src/ct_config.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/common_test/src/ct_config.erl') diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl index 30bf5925c0..06a8e12f55 100644 --- a/lib/common_test/src/ct_config.erl +++ b/lib/common_test/src/ct_config.erl @@ -532,7 +532,8 @@ do_require(Name,Key) -> case get_key_from_name(Name) of {error,_} -> allocate(Name,Key); - {ok,Key} -> + {ok,NameKey} when NameKey == Key; + is_tuple(Key) andalso element(1,Key) == NameKey -> %% already allocated - check that it has all required subkeys R = make_ref(), case get_config(Key,R,[]) of -- cgit v1.2.3