alaurenz / metrobike

0 stars 1 forks source link

Jenkins appears to be unable to process the "-" character when running tests. #95

Closed coreyh3 closed 11 years ago

coreyh3 commented 11 years ago

From http://nwebster.cs.washington.edu:8080/cse403/job/MetroBike/45/artifact/logcat.txt:

05-17 00:28:34.297 W/System.err( 883): Expected: 05-17 00:28:34.297 W/System.err( 883): Bicycling directions are in beta. Use caution � This route may contain streets that aren't suited for bicycling. 05-17 00:28:34.307 W/System.err( 883): Actual: 05-17 00:28:34.307 W/System.err( 883): Bicycling directions are in beta. Use caution – This route may contain streets that aren't suited for bicycling. 05-17 00:28:34.317 I/TestRunner( 883): failed: test_getWarningsTest(com.HuskySoft.metrobike.backend.test.RouteTest)

I'm not sure what the deal is but this runs completely fine locally.

CoolCapri commented 11 years ago

I tried running the test on my Mac using Android JUnit testing. It appeared that both getWarningsTest and toStringsTest failed

coreyh3 commented 11 years ago

I'm not quite sure what the issue would be. I do not have any local changes to RouteTest or Route in my repo. How are you running the unit tests? I had to make a change to AndroidManifest.xml to get them running on the emulator. I added the two highlighted lines below to make it work. Line 34 <activity

Corey

Date: Thu, 16 May 2013 18:09:26 -0700 From: notifications@github.com To: metrobike@noreply.github.com CC: corey_harmon_8@hotmail.com Subject: Re: [metrobike] Jenkins appears to be unable to process the "-" character when running tests. (#95)

I tried running the test on my Mac using Android JUnit testing. It appeared that both getWarningsTest and toStringsTest failed

— Reply to this email directly or view it on GitHub.

dutchscout commented 11 years ago

I think I fixed it!

There were 2 causes:

1) The encoding for the file itself was a bit strange. After fixing it a couple of times, I got the compiler to not waran about an unsupported character (the "-" in the test string).

2) The sample response JSON listed the "-" instead as "\u2013". This is probably a unicode representatation of a similar character. On our local systems, perhaps the character is seen as matching, while on Jenkins it is viewed as different. I decided to replace the "\u2013" with "-" so our tests could continue.