From be28bf1e234629a41a053aa816570442057b6a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 23 Jun 2017 14:25:35 +0300 Subject: [PATCH] Fix internal DCB test The test created a DCB of an unexpected type in an unexpected state with an invalid file descriptor. This caused the test to fail due to a debug assertion where the the validity of the file descriptor was asserted in relation to the internal state of the DCB. --- server/core/test/testdcb.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/core/test/testdcb.cc b/server/core/test/testdcb.cc index 011700645..dbda88def 100644 --- a/server/core/test/testdcb.cc +++ b/server/core/test/testdcb.cc @@ -48,14 +48,12 @@ test1() DCB *dcb; SERV_LISTENER dummy; /* Single buffer tests */ - ss_dfprintf(stderr, - "testdcb : creating buffer with type DCB_ROLE_SERVICE_LISTENER"); - dcb = dcb_alloc(DCB_ROLE_SERVICE_LISTENER, &dummy); + ss_dfprintf(stderr, "testdcb : creating buffer with type DCB_ROLE_SERVICE_LISTENER"); + dcb = dcb_alloc(DCB_ROLE_INTERNAL, &dummy); printDCB(dcb); ss_info_dassert(dcb_isvalid(dcb), "New DCB must be valid"); ss_dfprintf(stderr, "\t..done\nAllocated dcb."); printAllDCBs(); - ss_info_dassert(true, "Something is true"); ss_dfprintf(stderr, "\t..done\n"); dcb->state = DCB_STATE_POLLING; dcb_close(dcb);