Close session before terminate
Merge from the widevine repo of http://go/wvgerrit/16362 A test class holds a default session that it expects to be able to close in the tear down. This was not true in the TimingTest because it calls OEMCrypto_Terminate which closes all open sessions. This CL closes the default session, and then reopens it again after OEMCrypto_Initialize. Change-Id: Ib4128ec3c0a33794c03aa934174cb6fff448483e
This commit is contained in:
@@ -5495,10 +5495,13 @@ TEST_F(UsageTableTest, TimingTest) {
|
||||
|
||||
sleep(kLongSleep);
|
||||
// This is as close to reboot as we can simulate in code.
|
||||
ASSERT_NO_FATAL_FAILURE(session_.close()); // Close sessions before terminate.
|
||||
OEMCrypto_Terminate();
|
||||
sleep(kShortSleep);
|
||||
OEMCrypto_Initialize();
|
||||
EnsureTestKeys();
|
||||
// Test teardown expects session_ to be open.
|
||||
ASSERT_NO_FATAL_FAILURE(session_.open());
|
||||
|
||||
// After a reboot, we should be able to reload keys, and generate reports.
|
||||
sleep(kLongSleep);
|
||||
|
||||
Reference in New Issue
Block a user