1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
fakeshadow
2021-01-04 07:47:04 +08:00
committed by GitHub
parent 1f202d40e4
commit 32de9f8840
75 changed files with 788 additions and 826 deletions

View File

@ -108,14 +108,14 @@ async fn test_form() {
async fn test_timeout() {
let srv = test::start(|| {
App::new().service(web::resource("/").route(web::to(|| async {
actix_rt::time::delay_for(Duration::from_millis(200)).await;
actix_rt::time::sleep(Duration::from_millis(200)).await;
Ok::<_, Error>(HttpResponse::Ok().body(STR))
})))
});
let connector = awc::Connector::new()
.connector(actix_connect::new_connector(
actix_connect::start_default_resolver().await.unwrap(),
.connector(actix_tls::connect::new_connector(
actix_tls::connect::start_default_resolver().await.unwrap(),
))
.timeout(Duration::from_secs(15))
.finish();
@ -136,7 +136,7 @@ async fn test_timeout() {
async fn test_timeout_override() {
let srv = test::start(|| {
App::new().service(web::resource("/").route(web::to(|| async {
actix_rt::time::delay_for(Duration::from_millis(200)).await;
actix_rt::time::sleep(Duration::from_millis(200)).await;
Ok::<_, Error>(HttpResponse::Ok().body(STR))
})))
});

View File

@ -1,7 +1,7 @@
#![cfg(feature = "openssl")]
use actix_http::HttpService;
use actix_http_test::test_server;
use actix_service::{map_config, ServiceFactory};
use actix_service::{map_config, ServiceFactoryExt};
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use open_ssl::ssl::{SslAcceptor, SslConnector, SslFiletype, SslMethod, SslVerifyMode};

View File

@ -4,7 +4,7 @@ use std::sync::Arc;
use actix_http::HttpService;
use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactory};
use actix_service::{map_config, pipeline_factory, ServiceFactoryExt};
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use futures_util::future::ok;

View File

@ -4,7 +4,7 @@ use std::sync::Arc;
use actix_http::HttpService;
use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactory};
use actix_service::{map_config, pipeline_factory, ServiceFactoryExt};
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use futures_util::future::ok;