Skip to content

Commit a4a8723

Browse files
committed
Fix JUnit tests for logCache
The old "Applications.logs" method is keept for compatibility and when a log stream is needed. Adding new "logsRecent" method to access the logCache. integration-tests "ApplicationTest.logs" and "ApplicationTest.logsRecent" work. Minor changes in DefaultApplicationsTest in other JUnit tests to make them execute in Eclipse.
1 parent af93109 commit a4a8723

File tree

4 files changed

+392
-231
lines changed

4 files changed

+392
-231
lines changed

cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/Applications.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import org.cloudfoundry.doppler.LogMessage;
2020
import org.cloudfoundry.logcache.v1.Log;
2121
import org.cloudfoundry.logcache.v1.ReadRequest;
22-
import org.cloudfoundry.logcache.v1.ReadResponse;
23-
2422
import reactor.core.publisher.Flux;
2523
import reactor.core.publisher.Mono;
2624

@@ -119,12 +117,21 @@ public interface Applications {
119117
Flux<Task> listTasks(ListApplicationTasksRequest request);
120118

121119
/**
122-
* List the applications logs
120+
* List the applications logs from dopplerClient
121+
* @deprecated Only for compatibility. Switch to logCacheClient method below.
122+
* @param request the application logs request
123+
* @return the applications logs
124+
*/
125+
Flux<LogMessage> logs(LogsRequest request);
126+
127+
/**
128+
* List the applications logs from logCacheClient.
129+
* If no messages are available, an empty Flux is returned.
123130
*
124131
* @param request the application logs request
125132
* @return the applications logs
126133
*/
127-
Flux<Log> logs(LogsRequest request);
134+
Flux<Log> logsRecent(ReadRequest request);
128135

129136
/**
130137
* Push a specific application

0 commit comments

Comments
 (0)