From 2d39b7295c9f5076c80d6928aee5e18f9069d03d Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 24 Jul 2009 16:07:37 +0000 Subject: Test for a running instance of the artefact server. --- server/src/queryhandlerpentominos.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/queryhandlerpentominos.cc b/server/src/queryhandlerpentominos.cc index f70033d..ffa0946 100644 --- a/server/src/queryhandlerpentominos.cc +++ b/server/src/queryhandlerpentominos.cc @@ -233,7 +233,13 @@ QueryResult QueryHandlerPentominos::exec(Query &query) int main() { TCPSocket s; - s.connect("localhost", 11108); + try { + s.connect("localhost", 11108); + } catch(Exception &e) { + printf("ERROR: %s\n", e.what()); + printf("A running instance of the artefact server in needed on localhost, port 11108 in order for this test to run.\n"); + return 1; + } QueryHandlerPentominos qh(&s, "2003791613"); -- cgit v1.2.3