From 58993b1c83b58e36fa499c52dbf31d942d7d7d2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Wed, 11 Oct 2006 17:25:03 +0000 Subject: [PATCH] unit test to follow recent changes --- org.glite.lb.client/test/producer_test.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.client/test/producer_test.cpp b/org.glite.lb.client/test/producer_test.cpp index 33da719..2a6387d 100644 --- a/org.glite.lb.client/test/producer_test.cpp +++ b/org.glite.lb.client/test/producer_test.cpp @@ -14,9 +14,11 @@ #include #include "glite/lb/context-int.h" +#include "glite/lb/log_proto.h" extern "C" { -int edg_wll_log_proto_client(edg_wll_Context, int *,char *); +int edg_wll_log_write(edg_wll_Context, int *,char *); +int edg_wll_log_read(edg_wll_Context, int *); } class ProducerTest: public CppUnit::TestFixture @@ -40,10 +42,13 @@ public: edg_wll_Context context; int err; char *tst_msg = "DATE=20040831150159.702224 HOST=\"some.host\" PROG=edg-wms LVL=USAGE DG.PRIORITY=0 DG.SOURCE=\"UserInterface\" DG.SRC_INSTANCE=\"\" DG.EVNT=\"RegJob\" DG.JOBID=\"https://some.host:1234/x67qr549qc\" DG.SEQCODE=\"UI=2:NS=0:WM=0:BH=1:JSS=0:LM=0:LRMS=0:APP=0\" DG.REGJOB.JDL=\"\" DG.REGJOB.NS=\"ns address\" DG.REGJOB.PARENT=\"\" DG.REGJOB.JOBTYPE=\"SIMPLE\" DG.REGJOB.NSUBJOBS=\"0\" DG.REGJOB.SEED=\"\""; + int size = strlen(tst_msg)+1+EDG_WLL_LOG_SOCKET_HEADER_LENGTH+sizeof(size); err = edg_wll_InitContext(&context); CPPUNIT_ASSERT(err == 0); - err = edg_wll_log_proto_client(context, &pd[1], tst_msg); + err = edg_wll_log_write(context, &pd[1], tst_msg); + CPPUNIT_ASSERT(err == size); + err = edg_wll_log_read(context, &pd[1]); CPPUNIT_ASSERT(err == 0); log_proto_server(pd[0], tst_msg); edg_wll_FreeContext(context); -- 1.8.2.3