Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert more tests from Java to Kotlin #8155

Merged
merged 4 commits into from
Dec 23, 2023
Merged

Conversation

swankjesse
Copy link
Collaborator

No description provided.

@swankjesse
Copy link
Collaborator Author

swankjesse commented Dec 23, 2023

With this, our tests are almost all Kotlin.

./okhttp-tls/src/test/java/okhttp3/tls/CertificatesJavaTest.java
./regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java
./regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java
./regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

(There’s still decent amount of .java in samples/)

Copy link
Collaborator

@yschimke yschimke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to review it, then realised the light/dark green heuristic isn't actually effective. So skimmed, but really trusting that it's mostly automatic, and changes would cause failures.

@@ -48,7 +48,9 @@ class LoggingEventListenerTest {
val clientTestRule = OkHttpClientTestRule()
private lateinit var server: MockWebServer
private val handshakeCertificates = platform.localhostHandshakeCertificates()
private val logRecorder = HttpLoggingInterceptorTest.LogRecorder()
private val logRecorder = HttpLoggingInterceptorTest.LogRecorder(
prefix = Regex("""\[\d+ ms] """)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@yschimke yschimke merged commit 9724956 into master Dec 23, 2023
19 checks passed
@yschimke yschimke deleted the jwilson.1222.more_kt_tests branch December 23, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants