Issue #395: Change client packet list to FIFO order#435
Conversation
5871332 to
65aed46
Compare
ba15e1b to
cb765d6
Compare
de7312b to
a8562ac
Compare
Code ReviewThanks for tackling this — the test structure and worker setup follow existing patterns well. A few things need to be addressed before this can land. Critical Issues1. The actual fix is missing
2. The test asserts the wrong (broken) behavior The assertion block is labelled ASSERT_EQ('3', recorder.buffer[0]); // expects 3 first — this is LIFO
ASSERT_EQ('2', recorder.buffer[1]);
ASSERT_EQ('1', recorder.buffer[2]);The 3. Client is never connected to a server The test calls Moderate Issues4. Global mutable test state
5. Commented-out debug code // ASSERT_TRUE(1 == 0); // temporary debug line - remove for final PRThe author noted it should be removed — shouldn't be in the diff at all, even commented out. 6. Missing error check on server connection When What the
|
| Fix included | No |
| Test asserts correct (FIFO) behavior | No — asserts LIFO |
| Client connected to server | No |
| Debug leftovers | Yes |
The PR is correctly marked as a draft. The main things needed before it can be reviewed for merge: the packet.cc fix itself, inverted test assertions ('1', '2', '3'), and the missing gearman_client_add_server() call.
Um, yeah, I just dropped all those commits a couple hours ago in order to focus on getting the test working in an unchanged code state (with the order being LIFO). Getting a working test has been a challenge for me, obviously, and, at times, I wasn't sure if it was the test code or my changes to make the packet list FIFO. My plan is to get the test working first, then I'll modify the test to check FIFO and put the FIFO list changes back into place. I've stashed my changes away. |
This PR addresses (I hope) issue #395. Just a draft for now.