From 5cf07484f19387ebc7c7dff5bd79d65b4662d1d3 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 16 Jan 2023 08:11:17 -0800 Subject: [PATCH] Fix java discovery test failure (#24424) --- .github/workflows/tests.yaml | 2 -- .../commands/discover/DiscoverCommissionablesCommand.java | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2f438875c3305f..915e7c03bd9249 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -463,8 +463,6 @@ jobs: build \ " - name: Run Discover Tests - # temporarily disable the failing test, would re-enable it later - if: false timeout-minutes: 10 run: | scripts/run_in_build_env.sh \ diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.java b/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.java index 9970b7b4f950c9..2ba38307554fbd 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.java +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/discover/DiscoverCommissionablesCommand.java @@ -58,7 +58,8 @@ private final void getDiscoveredDevice() { } private final void logDevice(DiscoveredDevice device) { - System.out.format("\tDiscriminator: %ld", device.discriminator); - System.out.format("\tIP Address : %s", device.ipAddress); + System.out.println("Discovered node:"); + System.out.format("\tDiscriminator: %d", device.discriminator); + System.out.format("\tIP Address : %s%n", device.ipAddress); } }