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.
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user