From e12a837e1494327f351b0376ec19e47dad49b53c Mon Sep 17 00:00:00 2001 From: "John W. Bruce" Date: Tue, 15 Jan 2019 16:27:17 -0800 Subject: [PATCH] Re-enable Binary Provisioning Test Again (This is a merge of http://go/wvgerrit/70384) It turns out the reason the binary provisioning unit test was failing is because the test base class was setting the property to turn on binary provisioning before calling Init(), however all current Init() implementations overwrite the value of that field. As such, the tests weren't actually using binary provisioning. With that fixed, everything passes; the binary provisioning flow doesn't appear to actually be broken. This is the exact same commit as was previously reverted, cf5464d7a2fbecd1938ae0700199145b7b61c3c3. However, a pending patch fixes the multiple runs of Properties::Init() that lead to the inconsistent failures of the previous patch. (See http://go/wvgerrit/70383) Bug: 112046733 Test: CE CDM Unit Tests Test: Android Unit Tests Change-Id: I79fc2c8d4d24505b46cab0e21eef85a37d66748d --- libwvdrmengine/cdm/core/test/cdm_engine_test.cpp | 3 +-- libwvdrmengine/cdm/core/test/test_base.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp index f0476ce3..010b98a8 100644 --- a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp +++ b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp @@ -315,8 +315,7 @@ TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateInvalidTest) { TEST_F(WvCdmEnginePreProvTestStaging, ProvisioningTest) { Provision(); } -// TODO(b/112046733): This test is broken. It should be fixed. -TEST_F(WvCdmEnginePreProvTestUatBinary, DISABLED_ProvisioningTest) { +TEST_F(WvCdmEnginePreProvTestUatBinary, ProvisioningTest) { Provision(); } diff --git a/libwvdrmengine/cdm/core/test/test_base.cpp b/libwvdrmengine/cdm/core/test/test_base.cpp index 349cec5c..83a2daac 100644 --- a/libwvdrmengine/cdm/core/test/test_base.cpp +++ b/libwvdrmengine/cdm/core/test/test_base.cpp @@ -203,8 +203,8 @@ class TestCryptoSessionFactory : public CryptoSessionFactory { void WvCdmTestBase::SetUp() { ::testing::Test::SetUp(); - Properties::set_provisioning_messages_are_binary(binary_provisioning_); Properties::Init(); + Properties::set_provisioning_messages_are_binary(binary_provisioning_); // Log the current test name, to help with debugging when the log and stdout // are not the same. const ::testing::TestInfo* const test_info =