Skip to content

Commit

Permalink
[DO NOT MERGE] troubleshooting logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer committed Dec 19, 2024
1 parent 47ce990 commit efcf482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ private void readChunk() {
*/
public Long getProcessId(String app) {
try {
LOG.info("Checking process with pid {} anb command {}.", process.pid(), process.info().commandLine());
if (isUnix()) {
// wait for descendant process to be available
await().atMost(5000L, TimeUnit.MILLISECONDS)
.until(() -> process.descendants().findAny().isPresent());
return process.descendants()
.peek(p -> LOG.info("Checking descendant process with pid {} anb command {}.", p.pid(), p.info().commandLine()))
.filter(p -> p.info().commandLine().orElse("").contains(app))
.findFirst()
.map(ProcessHandle::pid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public void doExecute(TestContext context) {
for (int i = 0; i < maxAttempts; i++) {
String log = pao.getOutput();
if (log.length() > 0) {
logger.info("First log: %s".formatted(log));
break;
}

Expand Down

0 comments on commit efcf482

Please sign in to comment.