Polish
Closes gh-4572
This commit is contained in:
committed by
Stephane Nicoll
parent
31d7ebc96e
commit
8ec00c35bf
@@ -55,9 +55,9 @@ public class Log4J2RestartListener implements RestartListener {
|
||||
"hooks");
|
||||
ReflectionUtils.makeAccessible(hooksField);
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<Cancellable> state = (Collection<Cancellable>) ReflectionUtils
|
||||
Collection<Cancellable> hooks = (Collection<Cancellable>) ReflectionUtils
|
||||
.getField(hooksField, shutdownCallbackRegistry);
|
||||
state.clear();
|
||||
hooks.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class LocalDevToolsAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void liveReloadTriggerdOnClassPathChangeWithoutRestart() throws Exception {
|
||||
public void liveReloadTriggeredOnClassPathChangeWithoutRestart() throws Exception {
|
||||
this.context = initializeAndRun(ConfigWithMockLiveReload.class);
|
||||
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
|
||||
reset(server);
|
||||
@@ -150,7 +150,7 @@ public class LocalDevToolsAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void liveReloadNotTriggerdOnClassPathChangeWithRestart() throws Exception {
|
||||
public void liveReloadNotTriggeredOnClassPathChangeWithRestart() throws Exception {
|
||||
this.context = initializeAndRun(ConfigWithMockLiveReload.class);
|
||||
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
|
||||
reset(server);
|
||||
|
||||
@@ -94,12 +94,12 @@ public class ClassPathFileSystemWatcherTests {
|
||||
public static class Config {
|
||||
|
||||
@Autowired
|
||||
public Environment environemnt;
|
||||
public Environment environment;
|
||||
|
||||
@Bean
|
||||
public ClassPathFileSystemWatcher watcher() {
|
||||
FileSystemWatcher watcher = new FileSystemWatcher(false, 100, 10);
|
||||
URL[] urls = this.environemnt.getProperty("urls", URL[].class);
|
||||
URL[] urls = this.environment.getProperty("urls", URL[].class);
|
||||
return new ClassPathFileSystemWatcher(
|
||||
new MockFileSystemWatcherFactory(watcher), restartStrategy(), urls);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class ClassLoaderFilesTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serialzie() throws Exception {
|
||||
public void serialize() throws Exception {
|
||||
ClassLoaderFile file = new ClassLoaderFile(Kind.ADDED, new byte[10]);
|
||||
this.files.addFile("myfile", file);
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
@@ -58,7 +58,7 @@ public class HttpTunnelConnectionTests {
|
||||
|
||||
private String url;
|
||||
|
||||
private ByteArrayOutputStream incommingData;
|
||||
private ByteArrayOutputStream incomingData;
|
||||
|
||||
private WritableByteChannel incomingChannel;
|
||||
|
||||
@@ -71,8 +71,8 @@ public class HttpTunnelConnectionTests {
|
||||
public void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
this.url = "http://localhost:" + this.port;
|
||||
this.incommingData = new ByteArrayOutputStream();
|
||||
this.incomingChannel = Channels.newChannel(this.incommingData);
|
||||
this.incomingData = new ByteArrayOutputStream();
|
||||
this.incomingChannel = Channels.newChannel(this.incomingData);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -129,7 +129,7 @@ public class HttpTunnelConnectionTests {
|
||||
write(channel, "hello");
|
||||
write(channel, "1+1");
|
||||
write(channel, "1+2");
|
||||
assertThat(this.incommingData.toString(), equalTo("hi=2=3"));
|
||||
assertThat(this.incomingData.toString(), equalTo("hi=2=3"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -140,7 +140,7 @@ public class HttpTunnelConnectionTests {
|
||||
this.requestFactory.willRespond("hi");
|
||||
TunnelChannel channel = openTunnel(true);
|
||||
write(channel, "hello");
|
||||
assertThat(this.incommingData.toString(), equalTo("hi"));
|
||||
assertThat(this.incomingData.toString(), equalTo("hi"));
|
||||
assertThat(this.requestFactory.getExecutedRequests().size(), greaterThan(10));
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public class HttpTunnelServerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void intialRequestIsUsedForFirstServerResponse() throws Exception {
|
||||
public void initialRequestIsUsedForFirstServerResponse() throws Exception {
|
||||
this.servletRequest.addHeader(SEQ_HEADER, "1");
|
||||
this.servletRequest.setContent("hello".getBytes());
|
||||
this.server.handle(this.request, this.response);
|
||||
@@ -167,7 +167,7 @@ public class HttpTunnelServerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void typicalReqestResponseTraffic() throws Exception {
|
||||
public void typicalRequestResponseTraffic() throws Exception {
|
||||
MockHttpConnection h1 = new MockHttpConnection();
|
||||
this.server.handle(h1);
|
||||
MockHttpConnection h2 = new MockHttpConnection("hello server", 1);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class StaticPortProviderTests {
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
@Test
|
||||
public void portMustBePostive() throws Exception {
|
||||
public void portMustBePositive() throws Exception {
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
this.thrown.expectMessage("Port must be positive");
|
||||
new StaticPortProvider(0);
|
||||
|
||||
Reference in New Issue
Block a user