File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp
spring-websocket/src/test/java/org/springframework/web/socket Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 30
30
import org .apache .commons .logging .LogFactory ;
31
31
import org .junit .After ;
32
32
import org .junit .Before ;
33
+ import org .junit .Rule ;
33
34
import org .junit .Test ;
34
35
36
+ import org .junit .rules .TestName ;
35
37
import org .springframework .context .ApplicationEvent ;
36
38
import org .springframework .context .ApplicationEventPublisher ;
37
39
import org .springframework .messaging .Message ;
56
58
*/
57
59
public class StompBrokerRelayMessageHandlerIntegrationTests {
58
60
61
+ @ Rule
62
+ public final TestName testName = new TestName ();
63
+
59
64
private static final Log logger = LogFactory .getLog (StompBrokerRelayMessageHandlerIntegrationTests .class );
60
65
61
66
private static final Charset UTF_8 = Charset .forName ("UTF-8" );
@@ -75,14 +80,12 @@ public class StompBrokerRelayMessageHandlerIntegrationTests {
75
80
76
81
@ Before
77
82
public void setUp () throws Exception {
78
-
83
+ logger . debug ( "Setting up '" + this . testName . getMethodName () + "'" );
79
84
this .port = SocketUtils .findAvailableTcpPort (61613 );
80
-
81
85
this .responseChannel = new ExecutorSubscribableChannel ();
82
86
this .responseHandler = new TestMessageHandler ();
83
87
this .responseChannel .subscribe (this .responseHandler );
84
88
this .eventPublisher = new TestEventPublisher ();
85
-
86
89
startActiveMqBroker ();
87
90
createAndStartRelay ();
88
91
}
Original file line number Diff line number Diff line change 23
23
import org .apache .commons .logging .LogFactory ;
24
24
import org .junit .After ;
25
25
import org .junit .Before ;
26
+ import org .junit .Rule ;
27
+ import org .junit .rules .TestName ;
26
28
import org .junit .runners .Parameterized .Parameter ;
27
29
import org .springframework .context .Lifecycle ;
28
30
import org .springframework .context .annotation .Bean ;
@@ -53,6 +55,9 @@ public abstract class AbstractWebSocketIntegrationTests {
53
55
upgradeStrategyConfigTypes .put (UndertowTestServer .class , UndertowUpgradeStrategyConfig .class );
54
56
}
55
57
58
+ @ Rule
59
+ public final TestName testName = new TestName ();
60
+
56
61
@ Parameter (0 )
57
62
public WebSocketTestServer server ;
58
63
@@ -65,6 +70,10 @@ public abstract class AbstractWebSocketIntegrationTests {
65
70
@ Before
66
71
public void setup () throws Exception {
67
72
73
+ logger .debug ("Setting up '" + this .testName .getMethodName () + "', client=" +
74
+ this .webSocketClient .getClass ().getSimpleName () + ", server=" +
75
+ this .server .getClass ().getSimpleName ());
76
+
68
77
this .wac = new AnnotationConfigWebApplicationContext ();
69
78
this .wac .register (getAnnotatedConfigClasses ());
70
79
this .wac .register (upgradeStrategyConfigTypes .get (this .server .getClass ()));
Original file line number Diff line number Diff line change 21
21
import org .hamcrest .Matchers ;
22
22
import org .junit .After ;
23
23
import org .junit .Before ;
24
+ import org .junit .Rule ;
24
25
import org .junit .Test ;
26
+ import org .junit .rules .TestName ;
25
27
import org .springframework .beans .factory .annotation .Autowired ;
26
28
import org .springframework .context .annotation .Bean ;
27
29
import org .springframework .context .annotation .Configuration ;
75
77
*/
76
78
public abstract class AbstractSockJsIntegrationTests {
77
79
80
+ @ Rule
81
+ public final TestName testName = new TestName ();
82
+
78
83
protected Log logger = LogFactory .getLog (getClass ());
79
84
80
85
private WebSocketTestServer server ;
@@ -88,6 +93,7 @@ public abstract class AbstractSockJsIntegrationTests {
88
93
89
94
@ Before
90
95
public void setup () throws Exception {
96
+ logger .debug ("Setting up '" + this .testName .getMethodName () + "'" );
91
97
this .errorFilter = new ErrorFilter ();
92
98
this .wac = new AnnotationConfigWebApplicationContext ();
93
99
this .wac .register (TestConfig .class , upgradeStrategyConfigClass ());
You can’t perform that action at this time.
0 commit comments