{"action":"opened","issue":{"url":"https://api.github.com/repos/geonetwork/core-geonetwork/issues/1284","labels_url":"https://api.github.com/repos/geonetwork/core-geonetwork/issues/1284/labels{/name}","comments_url":"https://api.github.com/repos/geonetwork/core-geonetwork/issues/1284/comments","events_url":"https://api.github.com/repos/geonetwork/core-geonetwork/issues/1284/events","html_url":"https://github.com/geonetwork/core-geonetwork/issues/1284","id":115033572,"number":1284,"title":"Failing tests in domain module","user":{"login":"etj","id":717359,"avatar_url":"https://avatars.githubusercontent.com/u/717359?v=3","gravatar_id":"","url":"https://api.github.com/users/etj","html_url":"https://github.com/etj","followers_url":"https://api.github.com/users/etj/followers","following_url":"https://api.github.com/users/etj/following{/other_user}","gists_url":"https://api.github.com/users/etj/gists{/gist_id}","starred_url":"https://api.github.com/users/etj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etj/subscriptions","organizations_url":"https://api.github.com/users/etj/orgs","repos_url":"https://api.github.com/users/etj/repos","events_url":"https://api.github.com/users/etj/events{/privacy}","received_events_url":"https://api.github.com/users/etj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-04T11:32:17Z","updated_at":"2015-11-04T11:32:17Z","closed_at":null,"body":"The file ``core-geonetwork/domain/src/test/java/org/fao/geonet/repository/AbstractSpringDataTest.java`` defines an ``AtomicInteger`` used to create ids for test object instances:\r\n```\r\n    private final Random random = new Random();\r\n    protected final AtomicInteger _inc = new AtomicInteger(random.nextInt(16));\r\n```\r\n\r\nThis definition may randomly generate duplicate key errors, or errors like this one:\r\n\r\n```\r\ntestFindAllByGroupOwnerNameAndProfile(org.fao.geonet.repository.UserRepositoryTest)  Time elapsed: 0.028 sec  <<< FAILURE!\r\njava.lang.AssertionError: expected:<username9(382) - Editor> but was:<username10(383) - Reviewer>\r\n        at org.junit.Assert.fail(Assert.java:93)\r\n        at org.junit.Assert.failNotEquals(Assert.java:647)\r\n        at org.junit.Assert.assertEquals(Assert.java:128)\r\n        at org.junit.Assert.assertEquals(Assert.java:147)\r\n        at org.fao.geonet.repository.UserRepositoryTest.testFindAllByGroupOwnerNameAndProfile(UserRepositoryTest.java:168)\r\n```\r\n"}}