Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #490 from zanata/serialid-wordstat
Browse files Browse the repository at this point in the history
Add explicit serialVersionUID to subclasses of AbstractStatistic
  • Loading branch information
Alex Eng committed Jun 17, 2014
2 parents 85c7bce + 642e2a7 commit 421501d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Expand Up @@ -5,6 +5,8 @@
*/
public class MessageStatistic extends AbstractStatistic {

private static final long serialVersionUID = 1L;

public MessageStatistic() {
super();
}
Expand Down
Expand Up @@ -8,6 +8,8 @@
*/
public class WordStatistic extends AbstractStatistic {

private static final long serialVersionUID = -8807499518683834883L;

@Getter
@Setter
private double remainingHours;
Expand Down
6 changes: 5 additions & 1 deletion zanata-war/src/test/java/org/zanata/ZanataJpaTest.java
Expand Up @@ -6,6 +6,7 @@
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import net.sf.ehcache.CacheManager;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.junit.After;
Expand All @@ -23,7 +24,8 @@
import org.zanata.testng.TestMethodListener;

@Listeners(TestMethodListener.class)
@Test
// single threaded because of ehcache (perhaps other reasons too)
@Test(singleThreaded = true)
public abstract class ZanataJpaTest {
private static final Logger log = LoggerFactory.getLogger(ZanataJpaTest.class);
private static final String PERSIST_NAME = "zanataTestDatasourcePU";
Expand All @@ -36,6 +38,7 @@ public abstract class ZanataJpaTest {
@Before
protected void setupEM() {
log.debug("Setting up EM");
CacheManager.getInstance().clearAll();
em = emf.createEntityManager();
em.getTransaction().begin();
}
Expand All @@ -50,6 +53,7 @@ protected void shutdownEM() {
em.close();
}
em = null;
CacheManager.getInstance().clearAll();
}

protected EntityManager getEm() {
Expand Down
Expand Up @@ -84,6 +84,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

// single threaded because of ehcache (perhaps other reasons too)
@Test(singleThreaded = true)
public class TranslationResourceRestTest extends ZanataRestTest {
private static final Logger log = LoggerFactory
Expand Down

0 comments on commit 421501d

Please sign in to comment.