Remove SIMULATED_WAIT

Bug: webrtc:381524905
Change-Id: I24c455d6656412a9ce2e16250564d9986a6a6964
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460080
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47280}
This commit is contained in:
Evan Shrubsole 2026-03-25 10:51:18 +00:00 committed by WebRTC LUCI CQ
parent c6ef49b61e
commit 2395c1f954
31 changed files with 35 additions and 103 deletions

View File

@ -871,7 +871,6 @@ if (rtc_include_tests) {
"../rtc_base:checks",
"../rtc_base:copy_on_write_buffer",
"../rtc_base:dscp",
"../rtc_base:gunit_helpers",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:network_route",

View File

@ -325,7 +325,6 @@ if (rtc_include_tests) {
"../../../api/environment:environment_factory",
"../../../rtc_base:checks",
"../../../rtc_base:cpu_info",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:random",
"../../../rtc_base:safe_minmax",
"../../../rtc_base:stringutils",

View File

@ -304,7 +304,6 @@ rtc_library("speech_level_estimator_unittest") {
"..:apm_logging",
"../../../api/audio:audio_processing",
"../../../rtc_base:checks",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -323,7 +322,6 @@ rtc_library("adaptive_digital_gain_controller_unittest") {
"..:audio_frame_view",
"../../../api/audio:audio_processing",
"../../../common_audio",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -337,7 +335,6 @@ rtc_library("gain_applier_unittest") {
":gain_applier",
":test_utils",
"../../../api/audio:audio_frame_api",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -354,7 +351,6 @@ rtc_library("saturation_protector_unittest") {
":common",
":saturation_protector",
"..:apm_logging",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -364,7 +360,6 @@ rtc_library("biquad_filter_unittests") {
sources = [ "biquad_filter_unittest.cc" ]
deps = [
":biquad_filter",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -393,7 +388,6 @@ rtc_library("fixed_digital_unittests") {
"../../../api/audio:audio_frame_api",
"../../../common_audio",
"../../../rtc_base:checks",
"../../../rtc_base:gunit_helpers",
"../../../system_wrappers:metrics",
"../../../test:test_support",
]
@ -442,7 +436,6 @@ rtc_library("noise_estimator_unittests") {
"../../../api:function_view",
"../../../api/audio:audio_frame_api",
"../../../rtc_base:checks",
"../../../rtc_base:gunit_helpers",
"../../../test:test_support",
]
}
@ -455,7 +448,6 @@ rtc_library("vad_wrapper_unittests") {
":vad_wrapper",
"../../../api/audio:audio_frame_api",
"../../../rtc_base:checks",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:safe_compare",
"../../../test:test_support",
]

View File

@ -38,7 +38,6 @@ rtc_library("capture_levels_adjuster_unittests") {
":capture_levels_adjuster",
"..:audio_buffer",
"..:audioproc_test_utils",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:stringutils",
"../../../test:test_support",
]

View File

@ -48,7 +48,6 @@ rtc_library("capture_mixer_unittests") {
deps = [
":capture_mixer",
"..:audioproc_test_utils",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:stringutils",
"../../../test:test_support",
]

View File

@ -193,7 +193,6 @@ if (!build_with_chromium || is_linux || is_chromeos) {
"../../api/video:video_rtp_headers",
"../../common_video",
"../../rtc_base:checks",
"../../rtc_base:gunit_helpers",
"../../rtc_base:macromagic",
"../../rtc_base:timeutils",
"../../rtc_base/synchronization:mutex",

View File

@ -1195,7 +1195,6 @@ if (rtc_include_tests) {
"../rtc_base:copy_on_write_buffer",
"../rtc_base:crypto_random",
"../rtc_base:dscp",
"../rtc_base:gunit_helpers",
"../rtc_base:ip_address",
"../rtc_base:logging",
"../rtc_base:mdns_responder_interface",

View File

@ -751,7 +751,6 @@ if (rtc_include_tests) {
sources = [ "task_queue_stdlib_unittest.cc" ]
deps = [
":gunit_helpers",
":logging",
":rtc_event",
":rtc_task_queue_stdlib",
@ -1415,7 +1414,6 @@ if (rtc_include_tests) {
sources = [ "async_packet_socket_unittest.cc" ]
deps = [
":async_packet_socket",
":gunit_helpers",
":socket",
":socket_address",
"../test:test_support",
@ -1429,7 +1427,6 @@ if (rtc_include_tests) {
deps = [
":async_packet_socket",
":async_udp_socket",
":gunit_helpers",
":mock_socket",
":rtc_base_tests_utils",
":socket",
@ -1450,7 +1447,6 @@ if (rtc_include_tests) {
deps = [
":async_packet_socket",
":async_tcp_socket",
":gunit_helpers",
":net_helpers",
":rtc_base_tests_utils",
":socket",
@ -1739,19 +1735,6 @@ rtc_source_set("gtest_prod") {
sources = [ "gtest_prod_util.h" ]
}
rtc_library("gunit_helpers") {
testonly = true
sources = [ "gunit.h" ]
deps = [
":logging",
":rtc_base_tests_utils",
":stringutils",
":threading",
"../test:test_support",
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
rtc_library("testclient") {
testonly = true
sources = [
@ -1762,7 +1745,6 @@ rtc_library("testclient") {
":async_packet_socket",
":async_udp_socket",
":buffer",
":gunit_helpers",
":rtc_base_tests_utils",
":socket",
":socket_address",
@ -1783,7 +1765,6 @@ rtc_library("callback_list_unittests") {
sources = [ "callback_list_unittest.cc" ]
deps = [
":callback_list",
":gunit_helpers",
":untyped_function",
"../api:function_view",
"../test:test_support",
@ -1995,7 +1976,6 @@ if (rtc_include_tests) {
sources = [ "operations_chain_unittest.cc" ]
deps = [
":checks",
":gunit_helpers",
":rtc_event",
":rtc_operations_chain",
":threading",
@ -2026,7 +2006,6 @@ if (rtc_include_tests) {
":buffer",
":checks",
":file_rotating_stream",
":gunit_helpers",
":ip_address",
":logging",
":net_helpers",
@ -2127,7 +2106,6 @@ if (rtc_include_tests) {
":divide_round",
":event_tracer",
":frequency_tracker",
":gunit_helpers",
":histogram_percentile_counter",
":ip_address",
":logging",
@ -2202,7 +2180,6 @@ if (rtc_include_tests) {
sources = [ "task_queue_unittest.cc" ]
deps = [
":gunit_helpers",
":rtc_base_tests_utils",
":rtc_event",
":task_queue_for_test",
@ -2219,7 +2196,6 @@ if (rtc_include_tests) {
sources = [ "weak_ptr_unittest.cc" ]
deps = [
":gunit_helpers",
":rtc_base_tests_utils",
":rtc_event",
":task_queue_for_test",
@ -2259,7 +2235,6 @@ if (rtc_include_tests) {
sources = [ "strings/json_unittest.cc" ]
deps = [
":gunit_helpers",
":rtc_base_tests_utils",
":rtc_json",
"../test:test_support",
@ -2303,7 +2278,6 @@ if (rtc_include_tests) {
":data_rate_limiter",
":denormal_disabler",
":digest",
":gunit_helpers",
":ifaddrs_converter",
":ip_address",
":logging",

View File

@ -235,7 +235,6 @@ if (rtc_include_tests && !build_with_chromium) {
":quality_scaler_settings",
":quality_scaling_experiment",
":rate_control_settings",
"..:gunit_helpers",
"../../api:field_trials",
"../../api:field_trials_view",
"../../api/units:data_rate",

View File

@ -1,27 +0,0 @@
/*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_GUNIT_H_
#define RTC_BASE_GUNIT_H_
// TODO(bugs.webrtc.org/42226242): remove transitive includes
#include "rtc_base/thread.h" // IWYU pragma: keep
#include "test/gtest.h" // IWYU pragma: keep
// Wait until "ex" is true, or "timeout" expires, using fake clock where
// messages are processed every millisecond.
// TODO(pthatcher): Allow tests to control how many milliseconds to advance.
#define SIMULATED_WAIT(ex, timeout, clock) \
for (int64_t wait_start = ::webrtc::TimeMillis(); \
!(ex) && ::webrtc::TimeMillis() < wait_start + (timeout);) { \
(clock).AdvanceTime(webrtc::TimeDelta::Millis(1)); \
}
#endif // RTC_BASE_GUNIT_H_

View File

@ -12,7 +12,6 @@
#include <string>
#include "rtc_base/gunit.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/net_helpers.h"
#include "test/gtest.h"

View File

@ -90,7 +90,6 @@ if (rtc_enable_protobuf) {
"../../api:rtc_error_matchers",
"../../api/environment",
"../../api/environment:environment_factory",
"../../rtc_base:gunit_helpers",
"../../rtc_base:random",
"../../rtc_base:threading",
"../../rtc_base:timeutils",

View File

@ -1236,9 +1236,9 @@ if (is_ios || is_mac) {
"../media:rtc_media_base",
"../media:rtc_media_tests_utils",
"../modules/video_coding:video_codec_interface",
"../rtc_base:gunit_helpers",
"../rtc_base:refcount",
"../rtc_base:rtc_event",
"../rtc_base:threading",
"../rtc_base/system:unused",
"../system_wrappers",
"../test:create_test_environment",

View File

@ -12,10 +12,12 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "rtc_base/thread.h"
#include "test/gtest.h"
#include <vector>
#include "rtc_base/event.h"
#include "rtc_base/gunit.h"
#import "components/audio/RTCAudioSession+Private.h"
@ -25,8 +27,9 @@
@interface RTC_OBJC_TYPE (RTCAudioSession)
(UnitTesting)
@property(nonatomic, readonly) std::vector<
__weak id<RTC_OBJC_TYPE(RTCAudioSessionDelegate)> > delegates;
@property(nonatomic, readonly)
std::vector<__weak id<RTC_OBJC_TYPE(RTCAudioSessionDelegate)> >
delegates;
- (instancetype)initWithAudioSession:(id)audioSession;

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <vector>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <vector>
#import "api/peerconnection/RTCConfiguration+Private.h"
#import "api/peerconnection/RTCConfiguration.h"

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <vector>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <vector>
#import "api/peerconnection/RTCConfiguration+Private.h"
#import "api/peerconnection/RTCConfiguration.h"

View File

@ -11,7 +11,7 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include "rtc_base/gunit.h"
#include "test/gtest.h"
#import "api/peerconnection/RTCDataChannelConfiguration+Private.h"
#import "api/peerconnection/RTCDataChannelConfiguration.h"

View File

@ -12,8 +12,9 @@
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#include "api/test/rtc_error_matchers.h"
#include "rtc_base/gunit.h"
#include "test/gmock.h"
#include "test/wait_until.h"

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <memory>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <memory>
#import "api/peerconnection/RTCIceCandidate+Private.h"
#import "api/peerconnection/RTCIceCandidate.h"

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <vector>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <vector>
#import "api/peerconnection/RTCIceServer+Private.h"
#import "api/peerconnection/RTCIceServer.h"

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <memory>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <memory>
#import "api/peerconnection/RTCMediaConstraints+Private.h"
#import "api/peerconnection/RTCMediaConstraints.h"

View File

@ -10,6 +10,8 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -28,7 +30,6 @@ extern "C" {
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "rtc_base/gunit.h"
#include "rtc_base/system/unused.h"
@interface RTCPeerConnectionFactoryBuilderTests : XCTestCase

View File

@ -11,11 +11,11 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#include <memory>
#include <vector>
#include "rtc_base/gunit.h"
#import "api/peerconnection/RTCConfiguration+Private.h"
#import "api/peerconnection/RTCConfiguration.h"
#import "api/peerconnection/RTCCryptoOptions.h"

View File

@ -11,8 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#include "api/jsep.h"
#include "rtc_base/gunit.h"
#import "api/peerconnection/RTCSessionDescription+Private.h"
#import "api/peerconnection/RTCSessionDescription.h"

View File

@ -11,9 +11,9 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
#include <vector>
#include "test/gtest.h"
#include "rtc_base/gunit.h"
#include <vector>
#import "api/peerconnection/RTCTracing.h"
#import "helpers/NSString+StdString.h"

View File

@ -11,7 +11,7 @@
#import <Foundation/Foundation.h>
#import <OCMock/OCMock.h>
#include "rtc_base/gunit.h"
#include "test/gtest.h"
// Width and height don't play any role so lets use predefined values throughout
// the tests.

View File

@ -12,7 +12,6 @@
#include "common_video/h264/h264_common.h"
#include "components/video_codec/nalu_rewriter.h"
#include "rtc_base/gunit.h"
#import <XCTest/XCTest.h>
@ -212,11 +211,8 @@ static const uint8_t SPS_PPS_BUFFER[] = {
CMSampleBufferRef out_sample_buffer = nil;
CMVideoFormatDescriptionRef description = [self createDescription];
Boolean result =
webrtc::H264AnnexBBufferToCMSampleBuffer(annex_b_test_data,
description,
&out_sample_buffer,
memory_pool);
Boolean result = webrtc::H264AnnexBBufferToCMSampleBuffer(
annex_b_test_data, description, &out_sample_buffer, memory_pool);
XCTAssertTrue(result);

View File

@ -12,6 +12,8 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#include "sdk/objc/native/src/objc_video_decoder_factory.h"
#include "api/environment/environment_factory.h"
@ -20,7 +22,6 @@
#include "media/base/codec.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/gunit.h"
#import "sdk/objc/base/RTCMacros.h"
id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)> CreateDecoderFactoryReturning(

View File

@ -12,6 +12,8 @@
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#include "test/gtest.h"
#include "sdk/objc/native/src/objc_video_encoder_factory.h"
#include "api/environment/environment_factory.h"
@ -23,7 +25,6 @@
#import "components/video_frame_buffer/RTCCVPixelBuffer.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/gunit.h"
#include "sdk/objc/native/src/objc_frame_buffer.h"
id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)> CreateEncoderFactoryReturning(

View File

@ -63,7 +63,6 @@ if (rtc_include_tests && !build_with_chromium) {
"../api:scoped_refptr",
"../api/units:timestamp",
"../rtc_base:checks",
"../rtc_base:gunit_helpers",
"../rtc_base:rtc_json",
"../test:test_support",
]

View File

@ -348,7 +348,6 @@ if (!build_with_chromium) {
"../../../modules/audio_device:audio_device_impl",
"../../../pc:pc_test_utils",
"../../../pc:peerconnection_wrapper",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:logging",
"../../../rtc_base:rtc_event",
"../../../test:fileutils",