khttp
khttp copied to clipboard
Fix tests
Hi @Zemke There are some changes at the master branch which is in conflict with your changes. Any idea if those are resolvable?
Now that @bbeaupain is back there might be hope at last. I'll look into this.
From: Hakky54 [email protected] Sent: Wednesday, June 10, 2020 9:06:50 PM To: ascclemens/khttp [email protected] Cc: Florian Zemke [email protected]; Mention [email protected] Subject: Re: [ascclemens/khttp] Fix tests (#66)
Hi @Zemkehttps://github.com/Zemke There are some changes at the master branch which is in conflict with your changes. Any idea if those are resolvable?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ascclemens/khttp/pull/66#issuecomment-642200628, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAZ4D3J4W5QNNFNNE7TQ4TDRV7KUVANCNFSM4M3D7AEQ.
I have resolved the merge conflict but I get a new test error.
[ERROR] Errors:
[ERROR] ExtensionsSpec » IndexOutOfBounds toIndex (77) is greater than size (76).
That I get since d5672220f3c51c38d3a6980a04d48649dacda0b9. It's the conjunction of updates to the kotlin, spek, junit-platform-surefire-provider and maven-surefire-plugin deps that make the test fail. I have yet to debug this.
Moving on:
Interestingly many tests don't run at all when kotlin is set to version 1.1.1:
[INFO] Running khttp.KHttpDeleteSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.KHttpDeleteSpec
[INFO] Running khttp.KHttpAsyncOptionsSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.095 s - in khttp.KHttpAsyncOptionsSpec
[INFO] Running khttp.structures.maps.CaseInsensitiveMapSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.structures.maps.CaseInsensitiveMapSpec
[INFO] Running khttp.structures.parameters.ParametersSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.structures.parameters.ParametersSpec
[INFO] Running khttp.structures.files.FileLikeSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s - in khttp.structures.files.FileLikeSpec
[INFO] Running khttp.structures.cookie.CookieJarSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s - in khttp.structures.cookie.CookieJarSpec
[INFO] Running khttp.structures.cookie.CookieSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in khttp.structures.cookie.CookieSpec
[INFO] Running khttp.structures.authorization.BasicAuthorizationSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.structures.authorization.BasicAuthorizationSpec
[INFO] Running khttp.KHttpAsyncDeleteSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.43 s - in khttp.KHttpAsyncDeleteSpec
[INFO] Running khttp.KHttpAsyncPutSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.108 s - in khttp.KHttpAsyncPutSpec
[INFO] Running khttp.KHttpAsyncPatchSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.107 s - in khttp.KHttpAsyncPatchSpec
[INFO] Running khttp.extensions.ExtensionsSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.extensions.ExtensionsSpec
[INFO] Running khttp.KHttpAsyncPostSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.558 s - in khttp.KHttpAsyncPostSpec
[INFO] Running khttp.KHttpGetSpec
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.143 s <<< FAILURE! - in khttp.KHttpGetSpec
[ERROR] on iterating over the bytes Time elapsed: 0.023 s <<< FAILURE!
java.lang.AssertionError: Expected <34>, actual <68>.
[INFO] Running khttp.KHttpPatchSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpPatchSpec
[INFO] Running khttp.KHttpOptionsSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.KHttpOptionsSpec
[INFO] Running khttp.KHttpAsyncHeadSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.548 s - in khttp.KHttpAsyncHeadSpec
[INFO] Running khttp.KHttpPostSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 s - in khttp.KHttpPostSpec
[INFO] Running khttp.KHttpHeadSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpHeadSpec
[INFO] Running khttp.KHttpPutSpec
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpPutSpec
Fixed. This PR is yet again the master
with tests fixed. @bbeaupain @ascclemens
Interestingly many tests don't run at all when kotlin is set to version 1.1.1:
[INFO] Running khttp.KHttpDeleteSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.KHttpDeleteSpec [INFO] Running khttp.KHttpAsyncOptionsSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.095 s - in khttp.KHttpAsyncOptionsSpec [INFO] Running khttp.structures.maps.CaseInsensitiveMapSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.structures.maps.CaseInsensitiveMapSpec [INFO] Running khttp.structures.parameters.ParametersSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.structures.parameters.ParametersSpec [INFO] Running khttp.structures.files.FileLikeSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s - in khttp.structures.files.FileLikeSpec [INFO] Running khttp.structures.cookie.CookieJarSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s - in khttp.structures.cookie.CookieJarSpec [INFO] Running khttp.structures.cookie.CookieSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in khttp.structures.cookie.CookieSpec [INFO] Running khttp.structures.authorization.BasicAuthorizationSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.structures.authorization.BasicAuthorizationSpec [INFO] Running khttp.KHttpAsyncDeleteSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.43 s - in khttp.KHttpAsyncDeleteSpec [INFO] Running khttp.KHttpAsyncPutSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.108 s - in khttp.KHttpAsyncPutSpec [INFO] Running khttp.KHttpAsyncPatchSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.107 s - in khttp.KHttpAsyncPatchSpec [INFO] Running khttp.extensions.ExtensionsSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in khttp.extensions.ExtensionsSpec [INFO] Running khttp.KHttpAsyncPostSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.558 s - in khttp.KHttpAsyncPostSpec [INFO] Running khttp.KHttpGetSpec [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.143 s <<< FAILURE! - in khttp.KHttpGetSpec [ERROR] on iterating over the bytes Time elapsed: 0.023 s <<< FAILURE! java.lang.AssertionError: Expected <34>, actual <68>. [INFO] Running khttp.KHttpPatchSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpPatchSpec [INFO] Running khttp.KHttpOptionsSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in khttp.KHttpOptionsSpec [INFO] Running khttp.KHttpAsyncHeadSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.548 s - in khttp.KHttpAsyncHeadSpec [INFO] Running khttp.KHttpPostSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 s - in khttp.KHttpPostSpec [INFO] Running khttp.KHttpHeadSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpHeadSpec [INFO] Running khttp.KHttpPutSpec [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in khttp.KHttpPutSpec
I think the unit test are not so compatible with an older version of kotlin... But why would you run it with an older version of kotlin?
I was git bisecting the commit that introduced the failed test and it was d5672220f3c51c38d3a6980a04d48649dacda0b9 which did among a few other things change the Kotlin version. I noticed that the commit didn't actually change anything concerning the failing test. What it did though was actually make the test run at all. I didn't investigate further but maybe that test did never actually pass because the issue was a primitive exceedance of array size.
My idealist thought process was that something has broken the test in a way that it was not actually a logic or semantic error in the code but some kind of configuration change and the code was actually working just fine.
In reality the test must've been failing for quite some time but it wasn't noticed because it didn't run. But that's the state of this repo currently. I wish they gave me maintainer rights.