Skip to content

Commit

Permalink
move newly added failing test (for #70) under failing so as not to br…
Browse files Browse the repository at this point in the history
…eak CI
  • Loading branch information
cowtowncoder committed Dec 28, 2015
1 parent 9bb7ea0 commit 81e0532
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
package com.fasterxml.jackson.datatype.hibernate4;
package com.fasterxml.jackson.datatype.hibernate4.failing;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.hibernate.Hibernate;
import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.hibernate4.BaseTest;
import com.fasterxml.jackson.datatype.hibernate4.data.Contrato;

public class InfiniteRecursionTest extends BaseTest {
public class InfiniteRecursion70Test extends BaseTest {

// [Issue#70]
@Test
public void testInfinite() throws Exception {

EntityManagerFactory emf = Persistence.createEntityManagerFactory("persistenceUnit");
String expected = "{\"id\":1,\"numeroContrato\":\"100001-9\",\"parcelas\":[{\"id\":1,\"numeroParcela\":1}],\"liquidacoes\":[{\"id\":1,\"valorTotal\":10000,\"parcela\":{\"id\":1,\"numeroParcela\":1}}]}";
// [datatype-hibernate#70]
public void testInfinite() throws Exception
{
EntityManagerFactory emf = Persistence.createEntityManagerFactory("persistenceUnit");
String expected = "{\"id\":1,\"numeroContrato\":\"100001-9\",\"parcelas\":[{\"id\":1,\"numeroParcela\":1}],\"liquidacoes\":[{\"id\":1,\"valorTotal\":10000,\"parcela\":{\"id\":1,\"numeroParcela\":1}}]}";

try {
try {
EntityManager em = emf.createEntityManager();
ObjectMapper mapper = mapperWithModule(true);

Expand All @@ -39,7 +38,5 @@ public void testInfinite() throws Exception {
} finally {
emf.close();
}

}

}

0 comments on commit 81e0532

Please sign in to comment.