Skip to content

Commit

Permalink
bdlcc_deque remove expectation of hitting high-water mark from case 1…
Browse files Browse the repository at this point in the history
…5 (#5076)
  • Loading branch information
jfevold-bbg authored and GitHub Enterprise committed Nov 18, 2024
1 parent 4f3eb13 commit aa65937
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion groups/bdl/bdlcc/bdlcc_deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BSLS_IDENT("$Id: $")
// and the container has *space* *available* if it is not full. The high-water
// mark is set at construction and cannot be changed afterward. If no
// high-water mark is specified, the high-water mark of the container is
// effectively inifinite. Some of the variants of push operations (described
// effectively infinite. Some of the variants of push operations (described
// below) may fail, and the return status of those operations indicates whether
// the operation succeeded, failed, or partially succeeded (which may happen,
// for example, when pushing a range of values).
Expand Down
8 changes: 0 additions & 8 deletions groups/bdl/bdlcc/bdlcc_deque.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6625,8 +6625,6 @@ int main(int argc, char *argv[])
enum { NUM_HIGH_WATER_MARKS = sizeof HIGH_WATER_MARKS /
sizeof *HIGH_WATER_MARKS };

int timesFull = 0;

for (int ti = 0; ti < NUM_HIGH_WATER_MARKS; ++ti) {
const size_t HIGH_WATER_MARK = HIGH_WATER_MARKS[ti];

Expand All @@ -6649,7 +6647,6 @@ int main(int argc, char *argv[])
}
const size_t len = X.length();
ASSERT(len <= HIGH_WATER_MARK);
timesFull += HIGH_WATER_MARK == len;
if (expected & 1) {
ASSERT(mX.popFront() == expected);
}
Expand All @@ -6674,7 +6671,6 @@ int main(int argc, char *argv[])
}
const size_t len = X.length();
ASSERT(len <= HIGH_WATER_MARK);
timesFull += HIGH_WATER_MARK == len;
if (expected & 1) {
ASSERT(mX.popBack() == expected);
}
Expand All @@ -6688,10 +6684,6 @@ int main(int argc, char *argv[])
bslmt::ThreadUtil::join(handle);
}

const int minTimesFull = NUM_HIGH_WATER_MARKS * 2 * 40 / 5;
ASSERTV(timesFull, minTimesFull, timesFull >= minTimesFull);

if (veryVerbose) { P_(minTimesFull); P(timesFull); }
ASSERTV(da.numAllocations(), 0 == da.numAllocations());
} break;
case 14: {
Expand Down

0 comments on commit aa65937

Please sign in to comment.