diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2016-02-26 06:47:38 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2016-03-09 12:05:19 +0100 |
commit | db87ef023f4660fd2129f30dbbff05e73bff3dd5 (patch) | |
tree | b97030bda2efea02fc58e5f0eaebd1450bb00d82 /lib/stdlib/test/filename_SUITE.erl | |
parent | aeccfd1c8441ac0caa0c86aac19747eb64bd267d (diff) | |
download | erlang-db87ef023f4660fd2129f30dbbff05e73bff3dd5.tar.gz |
Modernize use of timetraps
Either rely on the default 30 minutes timetrap, or set the timeout
using the supported methods in common_test.
Diffstat (limited to 'lib/stdlib/test/filename_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/filename_SUITE.erl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/stdlib/test/filename_SUITE.erl b/lib/stdlib/test/filename_SUITE.erl index 7f2e4771f3..9dc147bee9 100644 --- a/lib/stdlib/test/filename_SUITE.erl +++ b/lib/stdlib/test/filename_SUITE.erl @@ -32,7 +32,9 @@ -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> [absname, absname_2, @@ -181,7 +183,6 @@ absname_2(Config) when is_list(Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% basename_1(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:seconds(10)), "." = filename:basename("."), "foo" = filename:basename("foo"), "foo" = filename:basename("/usr/foo"), @@ -202,11 +203,9 @@ basename_1(Config) when is_list(Config) -> "strange\\but\\true" = filename:basename("strange\\but\\true") end, - test_server:timetrap_cancel(Dog), ok. basename_2(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:seconds(10)), "." = filename:basename(".", ".erl"), "foo" = filename:basename("foo.erl", ".erl"), "foo" = filename:basename('foo.erl', ".erl"), @@ -232,7 +231,6 @@ basename_2(Config) when is_list(Config) -> "strange\\but\\true" = filename:basename("strange\\but\\true", ".erl") end, - test_server:timetrap_cancel(Dog), ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -553,7 +551,6 @@ absname_bin_2(Config) when is_list(Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% basename_bin_1(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:seconds(10)), <<".">> = filename:basename(<<".">>), <<"foo">> = filename:basename(<<"foo">>), <<"foo">> = filename:basename(<<"/usr/foo">>), @@ -565,11 +562,9 @@ basename_bin_1(Config) when is_list(Config) -> _ -> <<"strange\\but\\true">> = filename:basename(<<"strange\\but\\true">>) end, - test_server:timetrap_cancel(Dog), ok. basename_bin_2(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:seconds(10)), <<".">> = filename:basename(<<".">>, <<".erl">>), <<"foo">> = filename:basename(<<"foo.erl">>, <<".erl">>), <<"foo.erl">> = filename:basename(<<"/usr/foo.erl">>, <<".hrl">>), @@ -589,7 +584,6 @@ basename_bin_2(Config) when is_list(Config) -> <<"strange\\but\\true">> = filename:basename(<<"strange\\but\\true">>, <<".erl">>) end, - test_server:timetrap_cancel(Dog), ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |