Skip to content

Commit

Permalink
update according to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysGonchar committed Apr 18, 2019
1 parent 9be2cad commit 54a60b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions big_tests/tests/gdpr_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ retrieve_inbox(Config) ->
retrieve_logs(Config) ->
escalus:fresh_story(Config, [{alice, 1}],
fun(Alice) ->
User = escalus_client:username(Alice),
Domain = escalus_client:server(Alice),
JID = binary_to_list(User) ++ "@" ++ binary_to_list(Domain),
User = string:lowercase(escalus_client:username(Alice)),
Domain = string:lowercase(escalus_client:server(Alice)),
JID = string:uppercase(escalus_client:short_jid(Alice)),
MIM2Node = distributed_helper:mim2(),
mongoose_helper:successful_rpc(net_kernel, connect_node, [MIM2Node]),
mongoose_helper:successful_rpc(MIM2Node, error_logger, error_msg,
["event=disturbance_in_the_force, jid=" ++ JID, []]),
["event=disturbance_in_the_force, jid=~s", [JID]]),
Dir = request_and_unzip_personal_data(User, Domain, Config),
Filename = filename:join(Dir, "logs-" ++ atom_to_list(MIM2Node) ++ ".txt"),
{ok, Content} = file:read_file(Filename),
Expand Down
4 changes: 3 additions & 1 deletion src/admin_extra/service_admin_extra_gdpr.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
retrieve_all/3,
retrieve_logs/2]).

-define(CMD_TIMEOUT, 300000).

-spec commands() -> [ejabberd_commands:cmd()].
commands() -> [
#ejabberd_commands{name = retrieve_personal_data, tags = [gdpr],
Expand Down Expand Up @@ -89,7 +91,7 @@ get_logs(Username, Domain, TmpDir) ->
FileName = "logs-" ++ atom_to_list(node()) ++ ".txt",
FilePath = TmpDir ++ "/" ++ FileName,
Args = [FilePath, Username, Domain | FileList],
0 = run(Cmd, Args, 300000),
0 = run(Cmd, Args, ?CMD_TIMEOUT),
FileName.

-spec get_logs_from_node(node(), gdpr:username(), gdpr:domain(), file:name()) -> file:name().
Expand Down

0 comments on commit 54a60b1

Please sign in to comment.