<div dir="ltr"><div><div>Hi Peter,<br><br>Ok that's great - thanks for your assistance! <br><br></div>Cheers,<br></div>Tim<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 14 August 2013 12:36, Peter Andersson <span dir="ltr"><<a href="mailto:peter.e.andersson@ericsson.com" target="_blank">peter.e.andersson@ericsson.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Tim,<br>
<br>
Thanks for all the useful info!<br>
<br>
I haven't actually run any tests on this myself, only read some code so far. Obviously the init and terminate hook functions get called before the test server process is even started. In other words, these functions actually execute in that short "evil" window during startup when you can't call pal/2 or log/2. I missed that. :-( Sorry for misleading you!<br>
<br>
Let me dig into this properly and get back to you when I can propose useful (tested!) solutions to your problems!<br>
<br>
Best,<br>
Peter<br>
<br>
Ericsson AB, Erlang/OTP<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Wed, 14 Aug 2013, Tim Watson wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 14 August 2013 12:09, Tim Watson <<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When I execute a test run with this code in place however, I still get the<br>
crash, though the io:format/2 notice that I'm starting the ct log appears<br>
first:<br>
<br>
Common Test starting (cwd is<br>
/home/t4/work/vmware/rabbitmq-<u></u>public-umbrella/rabbitmq-test/<u></u>multi-node)<br>
<br>
starting ct log!<br>
<br>
<br>
ct_util_server got EXIT from <0.61.0>: {noproc,<br>
{gen_server,call,<br>
[test_server_io,<br>
{print,xxxFrom,unexpected_io,<br>
[[[["<div<br>
class=\"default\"><b>*** User 2013-08-14 12:02:36.830 ***</b>"],<br>
<br>
"\n",<br>
<br>
[91,102,114,97,109,101,119,<u></u>111,<br>
114,107,93,32,119,97,116,99,<br>
<br>
104,100,111,103,58,32,110,111,<br>
<br>
32,112,114,111,99,115,32,116,<br>
<br>
111,32,107,105,108,108,"\n"]],<br>
"\n","</div>"]]},<br>
infinity]}}<br>
<br>
<br>
So it appears that the assertion that logging will work between the hook's<br>
init and terminate callbacks isn't quite working.<br>
<br>
<br>
</blockquote>
Oh and I've tried pausing between the systest_ct_log:start/0 call and the<br>
(latter) systest:reset/0 call that triggers the logging, but that didn't<br>
make any difference either - e.g., like so:<br>
<br>
init(systest, Opts) -><br>
case application:start(systest, permanent) of<br>
{error, {already_started, systest}} -> io:format("starting ct<br>
log!~n"),<br>
systest_ct_log:start(),<br>
receive<br>
foobar -> ok<br>
after 2000 -> ok<br>
end,<br>
systest:reset();<br>
{error, _Reason}=Err -> Err;<br>
ok -> ok<br>
end,<br>
<br>
</blockquote>
</div></div></blockquote></div><br></div>