Fix TlsTransport test.
GitOrigin-RevId: bc5da0b5077558ac80d7ce736ef1063c2392ce05
This commit is contained in:
parent
e300208960
commit
8a94ce1458
@ -599,14 +599,16 @@ TEST(Mtproto, Grease) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Mtproto, TlsObfusaction) {
|
||||
std::string domain = "www.google.com";
|
||||
TEST(Mtproto, TlsTransport) {
|
||||
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR));
|
||||
ConcurrentScheduler sched;
|
||||
int threads_n = 1;
|
||||
sched.init(threads_n);
|
||||
{
|
||||
auto guard = sched.get_main_guard();
|
||||
class RunTest : public Actor {
|
||||
private:
|
||||
void start_up() override {
|
||||
class Callback : public TransparentProxy::Callback {
|
||||
public:
|
||||
void set_result(Result<SocketFd> result) override {
|
||||
@ -616,13 +618,18 @@ TEST(Mtproto, TlsObfusaction) {
|
||||
void on_connected() override {
|
||||
}
|
||||
};
|
||||
|
||||
const std::string domain = "www.google.com";
|
||||
IPAddress ip_address;
|
||||
ip_address.init_host_port(domain, 443).ensure();
|
||||
SocketFd fd = SocketFd::open(ip_address).move_as_ok();
|
||||
create_actor<TlsInit>("TlsInit", std::move(fd), IPAddress(), domain, "0123456789secret", make_unique<Callback>(),
|
||||
ActorShared<>(), Clocks::system() - Time::now())
|
||||
create_actor<TlsInit>("TlsInit", std::move(fd), IPAddress(), domain, "0123456789secret",
|
||||
make_unique<Callback>(), ActorShared<>(), Clocks::system() - Time::now())
|
||||
.release();
|
||||
}
|
||||
};
|
||||
create_actor<RunTest>("RunTest").release();
|
||||
}
|
||||
|
||||
sched.start();
|
||||
while (sched.run_main(10)) {
|
||||
|
Reference in New Issue
Block a user