Close Unused Sessions in NonceFlood Unit Test
Merge from widevine of http://go/wvgerrit/14263 The unit test PreventNonceFlood3 opens 8 sessions and floods the nonce table. It then opens one more session after a pause to verify that it can still request nonces. However, there is no requirement that we can open more than 8 sessions. This CL reuses one of the already open sessions to verify that we can continue generating nonces. Change-Id: If35f146477bd21e381ec5375dde7ec7fdbe8f366
This commit is contained in:
@@ -1778,10 +1778,8 @@ TEST_F(OEMCryptoClientTest, PreventNonceFlood3) {
|
||||
EXPECT_LE(valid_counter, 20 * (test_end - test_start + 2));
|
||||
error_counter = 0;
|
||||
sleep(2); // After a pause, we should be able to regenerate nonces.
|
||||
Session s7;
|
||||
s7.open();
|
||||
EXPECT_TRUE(s7.isOpen());
|
||||
s7.GenerateNonce(&nonce, &error_counter);
|
||||
EXPECT_TRUE(s[0].isOpen());
|
||||
s[0].GenerateNonce(&nonce, &error_counter);
|
||||
EXPECT_EQ(0, error_counter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user