@ -49,14 +49,14 @@ class HttpExchangesWebFilterTests {
@@ -49,14 +49,14 @@ class HttpExchangesWebFilterTests {
EnumSet . allOf ( Include . class ) ) ;
@Test
void filterTrace sExchange ( ) {
void filterRecord sExchange ( ) {
executeFilter ( MockServerWebExchange . from ( MockServerHttpRequest . get ( "https://api.example.com" ) ) ,
( exchange ) - > Mono . empty ( ) ) ;
assertThat ( this . repository . findAll ( ) ) . hasSize ( 1 ) ;
}
@Test
void filterCapture sSessionIdWhenSessionIsUsed ( ) {
void filterRecord sSessionIdWhenSessionIsUsed ( ) {
executeFilter ( MockServerWebExchange . from ( MockServerHttpRequest . get ( "https://api.example.com" ) ) ,
( exchange ) - > exchange . getSession ( ) . doOnNext ( ( session ) - > session . getAttributes ( ) . put ( "a" , "alpha" ) )
. then ( ) ) ;
@ -67,7 +67,7 @@ class HttpExchangesWebFilterTests {
@@ -67,7 +67,7 @@ class HttpExchangesWebFilterTests {
}
@Test
void filterDoesNotCapture IdOfUnusedSession ( ) {
void filterDoesNotRecord IdOfUnusedSession ( ) {
executeFilter ( MockServerWebExchange . from ( MockServerHttpRequest . get ( "https://api.example.com" ) ) ,
( exchange ) - > exchange . getSession ( ) . then ( ) ) ;
assertThat ( this . repository . findAll ( ) ) . hasSize ( 1 ) ;
@ -76,7 +76,7 @@ class HttpExchangesWebFilterTests {
@@ -76,7 +76,7 @@ class HttpExchangesWebFilterTests {
}
@Test
void filterCapture sPrincipal ( ) {
void filterRecord sPrincipal ( ) {
Principal principal = mock ( Principal . class ) ;
given ( principal . getName ( ) ) . willReturn ( "alice" ) ;
executeFilter ( new ServerWebExchangeDecorator (
@ -90,10 +90,10 @@ class HttpExchangesWebFilterTests {
@@ -90,10 +90,10 @@ class HttpExchangesWebFilterTests {
} , ( exchange ) - > exchange . getSession ( ) . doOnNext ( ( session ) - > session . getAttributes ( ) . put ( "a" , "alpha" ) ) . then ( ) ) ;
assertThat ( this . repository . findAll ( ) ) . hasSize ( 1 ) ;
org . springframework . boot . actuate . web . exchanges . HttpExchange . Principal trac edPrincipal = this . repository
org . springframework . boot . actuate . web . exchanges . HttpExchange . Principal record edPrincipal = this . repository
. findAll ( ) . get ( 0 ) . getPrincipal ( ) ;
assertThat ( trac edPrincipal) . isNotNull ( ) ;
assertThat ( trac edPrincipal. getName ( ) ) . isEqualTo ( "alice" ) ;
assertThat ( record edPrincipal) . isNotNull ( ) ;
assertThat ( record edPrincipal. getName ( ) ) . isEqualTo ( "alice" ) ;
}
private void executeFilter ( ServerWebExchange exchange , WebFilterChain chain ) {