Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Next Californium release?

I fixed the tests failing due to map order changes.
I still have some test failing due to weird synchronization code,
but they fail only in eclipse, not in maven. I'm not sure to understand the issue.
I asked for java 8 on hudson.
Now back to fixing scandium :)

--
Julien Vermillard :::: http://people.apache.org/~jvermillard/

On Thu, Sep 25, 2014 at 6:41 PM, Julien Vermillard <jvermillard@xxxxxxxxx> wrote:
On Thu, Sep 25, 2014 at 6:26 PM, Kovatsch Matthias <kovatsch@xxxxxxxxxxx> wrote:

BTW they don't run on Java 8. I see a lot of test using Thread.sleep(..) and order of Map (serialization of map to string and test)

 

I tried to keep Java 6 compatibility for Android, which is already broken in Scandium due to the security providers required from Java 7.

Is there a general problem with Thread.sleep() in Java 8 (why would they do that…) or are there restrictions for unit tests?


In Java 8 they tweaked the map, so if your test, test (directly or indirectly like after a json conversion) the order of the map, the test break.

For example: ResourceAttributesTest.java

Assert.assertEquals(serialized,
                               "</sensors>;title=\"Sensor Index\"," +
                               "</sensors/light>;if=\"sensor\";rt=\"light-lux\"," +
                               "</sensors/temp>;if=\"sensor\";foo;rt=\"temperature-c\";bar=\"one two\""
                               );
Since for building the string we walk HashMap we are dependent of order produced the HashMap implementation (which changed in Java8).

In some language (Go for example) walking a hashmap is done in random order for preventing this type of problems and hitting hard when you write the test :)

For sleep in test, it's a bad practice since java is far of being time predictable and it's a source of flaky tests.

 

 Should we contact the Webmaster about this? When I log in, I do not have the Manage Hudson link. 

 

Great, thanks!

How about repo.eclipse.org? What needs to be done there to get the artifacts into the Maven repo?

 

Okay, but the recent builds are missing since Hudson exhibits the above error, aren’t they?


Exactly :( 
We should configure hudson to send a mail to this mailing list in case of problem.
I'll do it when the webmaster give back my hudson configuration rights.
 

Is it otherwise fully linked with commits to GitHub (i.e, the Web hook to Hudson and Hudson to install the artifacts)?

 

I am really sorry for my inactivity on the project, there are so many other things I still have to attend :/


No problem, we all have real jobs ;)
 


Back to the top