Closed igor-cali closed 2 years ago
Hmm, the build failed after I merged this, I'm not sure why. I thought maybe an escaping problem, but all the problematic characters appear to be properly escaped.
Any ideas what the problem might be?
For the moment I've reverted the merge.
https://github.com/martykan/forecastie/runs/4406351766?check_suite_focus=true
The failure was a unit test, written by @fAntel for the notifications.
@robinpaulson How to dig this down? How to get the report file mention at the end of the log extract here?
(https://github.com/martykan/forecastie/runs/4406351766?check_suite_focus=true#step:4:725)
cz.martykan.forecastie.notifications.repository.WeatherRepositoryTests > observeWeatherEmitsNewValuesWhenTheyAreUpdatedInSharedPreference FAILED java.lang.AssertionError at WeatherRepositoryTests.java:140
86 tests completed, 1 failed, 1 skipped
FAILURE: Build failed with an exception.
Task :app:testDebugUnitTest FAILED
48 actionable tasks: 48 executed
- What went wrong: Execution failed for task ':app:testDebugUnitTest'.
There were failing tests. See the report at: file:///home/runner/work/forecastie/forecastie/app/build/reports/tests/testDebugUnitTest/index.html
How to get the report file mention at the end of the log extract here?
That can be done with a github action, by uploading that file as an artefact at the end of the build run. I don't think I'll be able to do that though, I've tried to upload artefacts (.apk) In the past and not been able.
The actions available (there are lots) are available here: https://github.com/actions/
I tried using this to upload the .apk. https://github.com/actions/upload-artifact
The same action could be used for uploading the file we want.
I need help here. I am not sure if the test failed due to the committed changes or for other reasons.
This is the exception I get running the test observeWeatherEmitsNewValuesWhenTheyAreUpdatedInSharedPreference
locally with coverage:
java.lang.VerifyError: Bad return type Exception Details: Location: android/content/res/ResourcesImpl.$$robo$$android_content_res_ResourcesImpl$loadComplexColorForCookie(Landroid/content/res/Resources;Landroid/util/TypedValue;ILandroid/content/res/Resources$Theme;)Landroid/content/res/ComplexColor; @565: areturn Reason: Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'android/content/res/ComplexColor' (from method signature) Current Frame: bci: @565 flags: { } locals: { 'android/content/res/ResourcesImpl', 'android/content/res/Resources', 'android/util/TypedValue', integer, 'android/content/res/Resources$Theme', 'java/lang/Object', 'java/lang/String', 'java/lang/Object', 'android/content/res/XmlResourceParser', 'android/util/AttributeSet', integer, 'java/lang/String' } stack: { 'java/lang/Object' } Bytecode: 0000000: 127c b800 823a 0519 0511 041b b800 862c 0000010: b401 a9c7 002a 1905 1104 1cb8 0086 bb04 0000020: 2a59 bb01 1b59 b701 1c13 042c b601 222c 0000030: b402 b5b6 017f b601 2cb7 042d bf19 0511 0000040: 0420 b800 862c b401 a9b9 01aa 0100 3a06 0000050: 1905 1104 31b8 0086 013a 0719 0511 0433 0000060: b800 8614 01d2 1906 b801 db19 0511 0434 0000070: b800 8619 0613 0373 b603 7799 0154 1905 0000080: 1104 36b8 0086 2a19 061d 2cb4 01a7 1304 0000090: 2fb6 037b 3a08 1905 1104 39b8 0086 1908 00000a0: b804 353a 0919 0511 043b b800 8619 08b9 00000b0: 0438 0100 5936 0a05 9f00 0c15 0a04 9f00 00000c0: 06a7 ffe4 1905 1104 3fb8 0086 150a 059f 00000d0: 0016 1905 1104 40b8 0086 bb03 bb59 1304 00000e0: 3ab7 043b bf19 0511 0443 b800 8619 08b9 00000f0: 043e 0100 3a0b 1905 1104 44b8 0086 190b 0000100: 1304 40b6 0192 9900 1a19 0511 0445 b800 0000110: 862b 1908 1909 1904 b804 463a 07a7 002a 0000120: 1905 1104 46b8 0086 190b 1304 48b6 0192 0000130: 9900 1719 0511 0447 b800 862b 1908 1909 0000140: 1904 b804 4b3a 0719 0511 0449 b800 8619 0000150: 08b9 0382 0100 1905 1104 51b8 0086 a700 0000160: bf19 0511 044a b800 863a 0819 0511 044b 0000170: b800 8614 01d2 b802 6519 0511 044c b800 0000180: 86bb 0016 59bb 011b 59b7 011c 1301 b0b6 0000190: 0122 1906 b601 2213 044d b601 221d 1905 00001a0: 1104 4eb8 0086 b801 28b6 0122 b601 2cb7 00001b0: 012f 3a09 1905 1104 4fb8 0086 1909 1908 00001c0: b601 c857 1905 1104 50b8 0086 1909 bf19 00001d0: 0511 0453 b800 8614 01d2 b802 6519 0511 00001e0: 0454 b800 86bb 0016 59bb 011b 59b7 011c 00001f0: 1301 b0b6 0122 1906 b601 2213 01c4 b601 0000200: 221d 1905 1104 56b8 0086 b801 28b6 0122 0000210: 1304 17b6 0122 b601 2cb7 012f bf19 0511 0000220: 0458 b800 8614 01d2 b802 6519 0511 045a 0000230: b800 8619 07b0
Exception Handler Table: bci [126, 342] => handler: 353 Stackmap Table: append_frame(@61,Object[#4]) full_frame(@165,{Object[#2],Object[#24],Object[#420],Integer,Object[#27],Object[#4],Object[#194],Null,Object[#897],Object[#1106]},{}) append_frame(@196,Integer) same_frame(@229) append_frame(@288,Object[#194]) full_frame(@327,{Object[#2],Object[#24],Object[#420],Integer,Object[#27],Object[#4],Object[#194],Object[#4],Object[#897],Object[#1106],Integer,Object[#194]},{}) full_frame(@353,{Object[#2],Object[#24],Object[#420],Integer,Object[#27],Object[#4],Object[#194],Object[#4]},{Object[#327]}) full_frame(@463,{Object[#2],Object[#24],Object[#420],Integer,Object[#27],Object[#4],Object[#194],Null},{}) full_frame(@541,{Object[#2],Object[#24],Object[#420],Integer,Object[#27],Object[#4],Object[#194],Object[#4],Object[#897],Object[#1106],Integer,Object[#194]},{})at android.content.res.Resources.constructor(Resources.java:220) at android.content.res.Resources.
(Resources.java) at android.content.pm.PackageParser.parseBaseApk(PackageParser.java:1330) at android.content.pm.PackageParser.parseMonolithicPackage(PackageParser.java:1283) at android.content.pm.PackageParser.parsePackage(PackageParser.java:1009) at android.content.pm.PackageParser.parsePackage(PackageParser.java:1029) at org.robolectric.shadows.ShadowPackageParser.callParsePackage(ShadowPackageParser.java:47) at org.robolectric.android.internal.AndroidTestEnvironment.loadAppPackage_measured(AndroidTestEnvironment.java:326) at org.robolectric.android.internal.AndroidTestEnvironment.lambda$loadAppPackage$1(AndroidTestEnvironment.java:296) at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:53) at org.robolectric.android.internal.AndroidTestEnvironment.loadAppPackage(AndroidTestEnvironment.java:294) at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:195) at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:171) at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:319) at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:254) at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
Sorry Igor, I'm afraid I'm not much help. It builds fine on GH without your commits, so I'm confident the problem is in the PR somewhere.
@fantel. Would you be able to lend a hand here, you wrote the original unit test i believe and might be able to help debug this failure?
I will try cherry picking each line, then building.
I will try cherry picking each line, then building.
@robinpaulson Do you have any progress? Shall I propose a new PR?
Hi @igor-cali , I got lost in trying to fix the UI problems, never got round to this. Sure, go for it, let's try again.
Hi, sorry, I missed this! Great work.