1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

bump service to stable v2

This commit is contained in:
Rob Ede
2021-04-16 20:28:21 +01:00
parent 8d88a0a9af
commit d8f56eee3e
16 changed files with 144 additions and 174 deletions

View File

@ -20,7 +20,7 @@ use actix_http::{
HttpService,
};
use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory};
use actix_service::{fn_service, map_config, ServiceFactoryExt as _};
use actix_web::{
dev::{AppConfig, BodyEncoding},
http::header,
@ -239,7 +239,7 @@ async fn test_connection_reuse() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})
@ -276,7 +276,7 @@ async fn test_connection_force_close() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})
@ -313,7 +313,7 @@ async fn test_connection_server_close() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})
@ -353,7 +353,7 @@ async fn test_connection_wait_queue() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})
@ -401,7 +401,7 @@ async fn test_connection_wait_queue_force_close() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})

View File

@ -7,7 +7,7 @@ use std::sync::Arc;
use actix_http::HttpService;
use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactoryExt};
use actix_service::{map_config, fn_service, ServiceFactoryExt};
use actix_utils::future::ok;
use actix_web::http::Version;
use actix_web::{dev::AppConfig, web, App, HttpResponse};
@ -48,7 +48,7 @@ async fn test_connection_reuse_h2() {
let srv = test_server(move || {
let num2 = num2.clone();
pipeline_factory(move |io| {
fn_service(move |io| {
num2.fetch_add(1, Ordering::Relaxed);
ok(io)
})