Revert 7355 "Fix parallelization in libjingle_p2p_unittest."

Breaks waterfall.

TBR=pbos@webrtc.org
BUG=N/A

Review URL: https://webrtc-codereview.appspot.com/22909004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7357 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2014-10-01 15:43:55 +00:00
parent 36b0c1afae
commit 4530b2ca48
2 changed files with 10 additions and 24 deletions

View File

@ -36,7 +36,6 @@
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/testclient.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/virtualsocketserver.h"
using rtc::SocketAddress;
using namespace cricket;
@ -55,25 +54,23 @@ static const char* msg2 = "Lobster Thermidor a Crevette with a mornay sauce...";
class RelayServerTest : public testing::Test {
public:
RelayServerTest()
: pss_(new rtc::PhysicalSocketServer),
ss_(new rtc::VirtualSocketServer(pss_.get())),
ss_scope_(ss_.get()),
: main_(rtc::Thread::Current()), ss_(main_->socketserver()),
username_(rtc::CreateRandomString(12)),
password_(rtc::CreateRandomString(12)) {}
password_(rtc::CreateRandomString(12)) {
}
protected:
virtual void SetUp() {
server_.reset(new RelayServer(rtc::Thread::Current()));
server_.reset(new RelayServer(main_));
server_->AddInternalSocket(
rtc::AsyncUDPSocket::Create(ss_.get(), server_int_addr));
rtc::AsyncUDPSocket::Create(ss_, server_int_addr));
server_->AddExternalSocket(
rtc::AsyncUDPSocket::Create(ss_.get(), server_ext_addr));
rtc::AsyncUDPSocket::Create(ss_, server_ext_addr));
client1_.reset(new rtc::TestClient(
rtc::AsyncUDPSocket::Create(ss_.get(), client1_addr)));
rtc::AsyncUDPSocket::Create(ss_, client1_addr)));
client2_.reset(new rtc::TestClient(
rtc::AsyncUDPSocket::Create(ss_.get(), client2_addr)));
rtc::AsyncUDPSocket::Create(ss_, client2_addr)));
}
void Allocate() {
@ -179,9 +176,8 @@ class RelayServerTest : public testing::Test {
msg->AddAttribute(attr);
}
rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
rtc::scoped_ptr<rtc::VirtualSocketServer> ss_;
rtc::SocketServerScope ss_scope_;
rtc::Thread* main_;
rtc::SocketServer* ss_;
rtc::scoped_ptr<RelayServer> server_;
rtc::scoped_ptr<rtc::TestClient> client1_;
rtc::scoped_ptr<rtc::TestClient> client2_;

View File

@ -54,9 +54,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/base/natserver.h"
#include "webrtc/base/natsocketfactory.h"
#include "webrtc/base/physicalsocketserver.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/virtualsocketserver.h"
using cricket::SignalingProtocol;
using cricket::PROTOCOL_HYBRID;
@ -1123,10 +1121,6 @@ class TestClient : public sigslot::has_slots<> {
class SessionTest : public testing::Test {
protected:
SessionTest()
: pss_(new rtc::PhysicalSocketServer),
ss_(new rtc::VirtualSocketServer(pss_.get())),
ss_scope_(ss_.get()) {}
virtual void SetUp() {
// Seed needed for each test to satisfy expectations.
rtc::SetRandomTestMode(true);
@ -2282,10 +2276,6 @@ class SessionTest : public testing::Test {
EXPECT_EQ(2ul, stats.proxy_to_transport.size());
EXPECT_EQ(2ul, stats.transport_stats.size());
}
rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_;
rtc::scoped_ptr<rtc::VirtualSocketServer> ss_;
rtc::SocketServerScope ss_scope_;
};
// For each of these, "X => Y = Z" means "if a client with protocol X