Abort loop on failure
As-is, on failure these will infinite loop, resulting in test timeout instead of failure. PiperOrigin-RevId: 254074989
This commit is contained in:
parent
9d2efaac5a
commit
773423a997
|
@ -268,7 +268,7 @@ TEST_P(TcpSocketTest, BlockingLargeWrite_NoRandomSave) {
|
|||
char readbuf[2500] = {};
|
||||
int n = -1;
|
||||
while (n != 0) {
|
||||
EXPECT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
ASSERT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
SyscallSucceeds());
|
||||
read_bytes += n;
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ TEST_P(TcpSocketTest, BlockingLargeSend_NoRandomSave) {
|
|||
char readbuf[2500] = {};
|
||||
int n = -1;
|
||||
while (n != 0) {
|
||||
EXPECT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
ASSERT_THAT(n = RetryEINTR(read)(t_, &readbuf, sizeof(readbuf)),
|
||||
SyscallSucceeds());
|
||||
read_bytes += n;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue