diff options
author | Erland Schönbeck <[email protected]> | 2015-03-05 13:37:16 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-03-20 15:28:54 +0100 |
commit | 1132117b38cfe33e770a0d5b1a782d48667427c4 (patch) | |
tree | c40c3da27e2f10a3c50cd5a2b4dc8d9db03aa08b /lib/inets/test/ftp_suite_lib.erl | |
parent | 403fe576cd71bf32c7e42b782bf3181d809bbc88 (diff) | |
download | otp-1132117b38cfe33e770a0d5b1a782d48667427c4.tar.gz otp-1132117b38cfe33e770a0d5b1a782d48667427c4.tar.bz2 otp-1132117b38cfe33e770a0d5b1a782d48667427c4.zip |
Use new time API and be back-compatible in inets
Remove unused functions and removed redundant test
Diffstat (limited to 'lib/inets/test/ftp_suite_lib.erl')
-rw-r--r-- | lib/inets/test/ftp_suite_lib.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl index daee1bdcdc..292a4399cd 100644 --- a/lib/inets/test/ftp_suite_lib.erl +++ b/lib/inets/test/ftp_suite_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2013. All Rights Reserved. +%% Copyright Ericsson AB 2005-2015. 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 @@ -1352,9 +1352,15 @@ do_delete(Pid, Config) -> ok. do_mkdir(Pid) -> - {A, B, C} = erlang:now(), - NewDir = "nisse_" ++ integer_to_list(A) ++ "_" ++ - integer_to_list(B) ++ "_" ++ integer_to_list(C), + %% Adapt to OTP 18 erlang time API and be back-compatible + NewDir = try + "earl_" ++ integer_to_list(erlang:unique_integer([positive])) + catch + error:undef -> + {A, B, C} = erlang:now(), + "nisse_" ++ integer_to_list(A) ++ "_" ++ + integer_to_list(B) ++ "_" ++ integer_to_list(C) + end, ok = ftp:cd(Pid, "incoming"), {ok, CurrDir} = ftp:pwd(Pid), {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."), |