Now I have the same behaviour on different machines (Ubuntu, Windows).
Unfortunately, the project was not added to Jenkins at that time, so I
don't have a green build.
Bisect did not reveal anything. Anyway, I'm starting to have doubts
whether the build worked using maven (for this test class). This is a
legacy library that I'm adding unit tests to it. Some unit tests work
ok (like the ones depending on ConnectivityManager, SQLiteDatabase,
Robolectric.Reflection.setFinalStaticField), while only the ones
depending on http fail.
The Test Classpath is:
target/test-classes
target/classes
.m2/repository/com/google/android/android/4.1/android-4.1.jar
.m2/repository/com/google/android/android-test/4.1/android-
test-4.1.jar
.m2/repository/com/google/android/maps/maps/7_r1/maps-7_r1.jar
.m2/repository/com/pivotallabs/robolectric/1.2/robolectric-1.2.jar
.m2/repository/org/objenesis/objenesis/1.0/objenesis-1.0.jar
.m2/repository/org/xerial/sqlite-jdbc/3.7.2/sqlite-jdbc-3.7.2.jar
.m2/repository/org/javassist/javassist/3.14.0-GA/javassist-3.14.0-
GA.jar
.m2/repository/commons-logging/commons-logging/1.1.1/commons-
logging-1.1.1.jar
.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
.m2/repository/org/apache/httpcomponents/httpclient/4.0.3/
httpclient-4.0.3.jar
.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/
httpcore-4.0.1.jar
.m2/repository/com/google/android/support-v4/r6/support-v4-r6.jar
.m2/repository/org/hamcrest/hamcrest-core/1.2/hamcrest-core-1.2.jar
.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar
I don't know how robolectric is managing the class loading, but
according to this classpath and java2 classloading style, the Android
classes will be loaded first.
Any other suggestion?
Thanks.