import android.util.Log import com.bingce.controlnetwork.http.RetrofitClient import com.bingce.controlnetwork.http.sevice.CommonService import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import org.junit.Test class HelloKotlin { @Test fun test() { runBlocking { launch { Log.d("hwhw", "请求1") delay(1000) Log.d("hwhw", "请求1 delay") val apiCall = RetrofitClient.apiCall { RetrofitClient.createService().getPassageData() } apiCall?.let { Log.d("hwhw", "请求成功1,$it") } } launch { Log.d("hwhw", "请求2") delay(1000) Log.d("hwhw", "请求2 delay") val apiCall1 = RetrofitClient.apiCall { RetrofitClient.createService().getPassageData() } apiCall1?.let { Log.d("hwhw", "请求成功2,$it") } } } } }