// disable proxy validation for this test, since Loggregator websockets
// connectivity does not currently support proxies
new SocketDestHelper().setAllowedOnCurrentThread();
String appName = namespacedAppName("simple_logs");
CloudApplication app = createAndUploadAndStartSimpleSpringApp(appName);
boolean pass = getInstanceInfosWithTimeout(appName, 1, true);
assertTrue("Couldn't get the right application state", pass);
List<ApplicationLog> logs = doGetRecentLogs(appName);
for (int index = 0; index < logs.size() - 1; index++) {
int comparison = logs.get(index).getTimestamp().compareTo(logs.get(index + 1).getTimestamp());
assertTrue("Logs are not properly sorted", comparison <= 0);
}
AccumulatingApplicationLogListener testListener = new AccumulatingApplicationLogListener();
connectedClient.streamLogs(appName, testListener);
String appUri = "http://" + app.getUris().get(0);
RestTemplate appTemplate = new RestTemplate();
int attempt = 0;
do {
// no need to sleep, visiting the app uri should be sufficient
try {