[erlang-questions] CT take a long time to warm up

Roberto Ostinelli roberto@REDACTED
Mon Sep 24 03:01:46 CEST 2012


Hi all,

a very simple CT test takes forever to boot.


%%%%%% Module %%%%%%%%%

-module(mymodule).
-export([greetings/1]).

greetings(Text) ->
lists:flatten(io_lib:format("~s world!", [Text])).

%%%%%%%%%%%%%%%%%%%%%%%


%%%%%% CT test %%%%%%%%

-module(mymodule_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
-export([greetings_test/1]).

all() ->
[greetings_test].

greetings_test(_Config) ->
"hello world!" = mymodule:greetings("hello"),
"goodbye world!" = mymodule:greetings("goodbye").

%%%%%%%%%%%%%%%%%%%%%%%


Here's the log:

==================

=== Suite started at 2012-09-23 17:22:24
=== Starting test, 1 test cases
=cases         1
=user          roberto
=host          robertos-MacBook-Pro.local
=hosts         robertos-MacBook-Pro.local
=emulator_vsn  5.9.1
=emulator      beam
=otp_release   R15B01
=started       2012-09-23 17:22:*24*
=case          ct_framework:init_per_suite
=logfile       ct_framework.init_per_suite.html
=group_props   [{suite,mymodule_SUITE}]
=started       2012-09-23 17:22:*44*
=ended         2012-09-23 17:22:44
=result        ok
=elapsed       1.0e-6
=case          mymodule_SUITE:greetings_test
=logfile       mymodule_suite.greetings_test.html
=started       2012-09-23 17:22:44
=ended         2012-09-23 17:22:44
=result        ok
=elapsed       3.1e-4
=case          ct_framework:end_per_suite
=logfile       ct_framework.end_per_suite.html
=group_props   [{suite,mymodule_SUITE}]
=started       2012-09-23 17:22:44
=ended         2012-09-23 17:22:44
=result        ok
=elapsed       1.0e-6
=group_time    0.054s
=== TEST COMPLETE, 1 ok, 0 failed of 1 test cases

=finished      2012-09-23 17:22:44
=failed        0
=successful    1
=user_skipped  0
=auto_skipped  0

==================

it literally takes 20 seconds before the first (and only) test is run. Any
ideas why?

Thank you,

r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120923/3be30d59/attachment.htm>


More information about the erlang-questions mailing list