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;
|
DCB *dcb;
|
||||||
SERV_LISTENER dummy;
|
SERV_LISTENER dummy;
|
||||||
/* Single buffer tests */
|
/* Single buffer tests */
|
||||||
ss_dfprintf(stderr,
|
ss_dfprintf(stderr, "testdcb : creating buffer with type DCB_ROLE_SERVICE_LISTENER");
|
||||||
"testdcb : creating buffer with type DCB_ROLE_SERVICE_LISTENER");
|
dcb = dcb_alloc(DCB_ROLE_INTERNAL, &dummy);
|
||||||
dcb = dcb_alloc(DCB_ROLE_SERVICE_LISTENER, &dummy);
|
|
||||||
printDCB(dcb);
|
printDCB(dcb);
|
||||||
ss_info_dassert(dcb_isvalid(dcb), "New DCB must be valid");
|
ss_info_dassert(dcb_isvalid(dcb), "New DCB must be valid");
|
||||||
ss_dfprintf(stderr, "\t..done\nAllocated dcb.");
|
ss_dfprintf(stderr, "\t..done\nAllocated dcb.");
|
||||||
printAllDCBs();
|
printAllDCBs();
|
||||||
ss_info_dassert(true, "Something is true");
|
|
||||||
ss_dfprintf(stderr, "\t..done\n");
|
ss_dfprintf(stderr, "\t..done\n");
|
||||||
dcb->state = DCB_STATE_POLLING;
|
dcb->state = DCB_STATE_POLLING;
|
||||||
dcb_close(dcb);
|
dcb_close(dcb);
|
||||||
|
|||||||
Reference in New Issue
Block a user