gorealis v2 refactor (#5)

* Changing default timeout for start maintenance.

* Upgrading dependencies to gorealis v2 and thrift  0.12.0

* Refactored to update to gorealis v2.
This commit is contained in:
Renan DelValle 2018-12-27 11:31:51 -08:00 committed by GitHub
parent ad4dd9606e
commit 6ab5c9334d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1335 changed files with 137431 additions and 61530 deletions

View file

@ -51,8 +51,9 @@ parse_args([Head | Rest], Opts) ->
ssl:start(),
SslOptions =
{ssloptions, [
{certfile, "../keys/client.crt"}
,{keyfile, "../keys/server.key"}
{cacertfile, "../keys/CA.pem"},
{certfile, "../keys/client.pem"},
{keyfile, "../keys/client.key"}
]},
Opts#options{client_opts = [{ssltransport, true} | [SslOptions | Opts#options.client_opts]]};
"--protocol=" ++ Proto ->
@ -159,12 +160,11 @@ start(Args) ->
ClientS4
end,
%% Use deprecated erlang:now until we start requiring OTP18
%% Started = erlang:monotonic_time(milli_seconds),
{_, StartSec, StartUSec} = erlang:now(),
{_, StartSec, StartUSec} = erlang:timestamp(),
error_logger:info_msg("testOneway"),
{Client20, {ok, ok}} = thrift_client:call(Client19, testOneway, [1]),
{_, EndSec, EndUSec} = erlang:now(),
{_, EndSec, EndUSec} = erlang:timestamp(),
Elapsed = (EndSec - StartSec) * 1000 + (EndUSec - StartUSec) / 1000,
if
Elapsed > 1000 -> exit(1);

View file

@ -51,7 +51,7 @@ parse_args([Head | Rest], Opts) ->
ssl:start(),
SslOptions =
{ssloptions, [
{certfile, "../keys/server.crt"}
{certfile, "../keys/server.pem"}
,{keyfile, "../keys/server.key"}
]},
Opts#options{server_opts = [{ssltransport, true} | [SslOptions | Opts#options.server_opts]]};

View file

@ -22,7 +22,7 @@
{description, "Thrift cross language test"},
% The version of the applicaton
{vsn, "0.10.0"},
{vsn, "0.12.0"},
% All modules used by the application.
{modules, [