diff --git a/thread/tests/integration/src/android/net/thread/utils/IntegrationTestUtils.kt b/thread/tests/integration/src/android/net/thread/utils/IntegrationTestUtils.kt index 316f5704d4..801e21e33e 100644 --- a/thread/tests/integration/src/android/net/thread/utils/IntegrationTestUtils.kt +++ b/thread/tests/integration/src/android/net/thread/utils/IntegrationTestUtils.kt @@ -39,6 +39,7 @@ import android.os.Handler import android.os.SystemClock import android.system.OsConstants import android.system.OsConstants.IPPROTO_ICMP +import android.util.Log import androidx.test.core.app.ApplicationProvider import com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow import com.android.net.module.util.IpUtils @@ -84,6 +85,8 @@ import org.junit.Assert /** Utilities for Thread integration tests. */ object IntegrationTestUtils { + private val TAG = IntegrationTestUtils::class.simpleName + // The timeout of join() after restarting ot-daemon. The device needs to send 6 Link Request // every 5 seconds, followed by 4 Parent Request every second. So this value needs to be 40 // seconds to be safe @@ -483,6 +486,7 @@ object IntegrationTestUtils { val serviceInfoFuture = CompletableFuture() val listener: NsdManager.DiscoveryListener = object : DefaultDiscoveryListener() { override fun onServiceFound(serviceInfo: NsdServiceInfo) { + Log.d(TAG, "onServiceFound: $serviceInfo") serviceInfoFuture.complete(serviceInfo) } } @@ -530,6 +534,7 @@ object IntegrationTestUtils { val resolvedServiceInfoFuture = CompletableFuture() val callback: NsdManager.ServiceInfoCallback = object : DefaultServiceInfoCallback() { override fun onServiceUpdated(serviceInfo: NsdServiceInfo) { + Log.d(TAG, "onServiceUpdated: $serviceInfo") if (predicate.test(serviceInfo)) { resolvedServiceInfoFuture.complete(serviceInfo) }