mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Assert some pointers that might be flaky.
Speculative fix; replaces nullpointer following with test failure. Bug: b/307520538 Change-Id: I294d5747c852a8cde43a0acad973dca12712c69e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326000 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41077}
This commit is contained in:
parent
4fd1cc70da
commit
97f3fb08a0
1 changed files with 6 additions and 0 deletions
|
@ -31,8 +31,11 @@
|
||||||
#include "rtc_base/ssl_identity.h"
|
#include "rtc_base/ssl_identity.h"
|
||||||
#include "rtc_base/stream.h"
|
#include "rtc_base/stream.h"
|
||||||
#include "test/field_trial.h"
|
#include "test/field_trial.h"
|
||||||
|
#include "test/gmock.h"
|
||||||
|
#include "test/gtest.h"
|
||||||
|
|
||||||
using ::testing::Combine;
|
using ::testing::Combine;
|
||||||
|
using ::testing::NotNull;
|
||||||
using ::testing::tuple;
|
using ::testing::tuple;
|
||||||
using ::testing::Values;
|
using ::testing::Values;
|
||||||
using ::testing::WithParamInterface;
|
using ::testing::WithParamInterface;
|
||||||
|
@ -593,9 +596,12 @@ class SSLStreamAdapterTestBase : public ::testing::Test,
|
||||||
size_t client_digest_len;
|
size_t client_digest_len;
|
||||||
bool rv;
|
bool rv;
|
||||||
|
|
||||||
|
ASSERT_THAT(server_identity(), NotNull());
|
||||||
rv = server_identity()->certificate().ComputeDigest(
|
rv = server_identity()->certificate().ComputeDigest(
|
||||||
rtc::DIGEST_SHA_1, server_digest, 20, &server_digest_len);
|
rtc::DIGEST_SHA_1, server_digest, 20, &server_digest_len);
|
||||||
ASSERT_TRUE(rv);
|
ASSERT_TRUE(rv);
|
||||||
|
|
||||||
|
ASSERT_THAT(client_identity(), NotNull());
|
||||||
rv = client_identity()->certificate().ComputeDigest(
|
rv = client_identity()->certificate().ComputeDigest(
|
||||||
rtc::DIGEST_SHA_1, client_digest, 20, &client_digest_len);
|
rtc::DIGEST_SHA_1, client_digest, 20, &client_digest_len);
|
||||||
ASSERT_TRUE(rv);
|
ASSERT_TRUE(rv);
|
||||||
|
|
Loading…
Reference in a new issue