Revert "trying to find reason for failing tests in Jenkins, locally all tests are green"

This reverts commit 318ecd0be4.
This commit is contained in:
Michael Hoennig 2019-04-27 06:36:01 +02:00
parent f08a1d89b3
commit f301364d84

View File

@ -7,7 +7,6 @@ import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
import org.hostsharing.hsadminng.repository.AssetRepository; import org.hostsharing.hsadminng.repository.AssetRepository;
import org.hostsharing.hsadminng.service.AssetQueryService; import org.hostsharing.hsadminng.service.AssetQueryService;
import org.hostsharing.hsadminng.service.AssetService; import org.hostsharing.hsadminng.service.AssetService;
import org.hostsharing.hsadminng.service.CustomerService;
import org.hostsharing.hsadminng.service.dto.AssetDTO; import org.hostsharing.hsadminng.service.dto.AssetDTO;
import org.hostsharing.hsadminng.service.mapper.AssetMapper; import org.hostsharing.hsadminng.service.mapper.AssetMapper;
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
@ -61,9 +60,6 @@ public class AssetResourceIntTest {
private static final String DEFAULT_REMARK = "AAAAAAAAAA"; private static final String DEFAULT_REMARK = "AAAAAAAAAA";
private static final String UPDATED_REMARK = "BBBBBBBBBB"; private static final String UPDATED_REMARK = "BBBBBBBBBB";
@Autowired
private CustomerService customerService;
@Autowired @Autowired
private AssetRepository assetRepository; private AssetRepository assetRepository;
@ -124,7 +120,6 @@ public class AssetResourceIntTest {
Membership membership = MembershipResourceIntTest.createEntity(em); Membership membership = MembershipResourceIntTest.createEntity(em);
em.persist(membership); em.persist(membership);
em.flush(); em.flush();
asset.setMembership(membership); asset.setMembership(membership);
return asset; return asset;
} }
@ -149,13 +144,9 @@ public class AssetResourceIntTest {
em.flush(); em.flush();
return asset; return asset;
} }
@Before @Before
public void initTest() { public void initTest() {
asset = createEntity(em); asset = createEntity(em);
// TOOD: on Jenkins the customer row vanishes, locally all tests are green
assertThat(customerService.findOne(asset.getMembership().getCustomer().getId())).as("precondition failed").isNotNull();
} }
@Test @Test
@ -320,15 +311,10 @@ public class AssetResourceIntTest {
assetRepository.saveAndFlush(asset); assetRepository.saveAndFlush(asset);
// Get all the assetList where documentDate equals to DEFAULT_DOCUMENT_DATE // Get all the assetList where documentDate equals to DEFAULT_DOCUMENT_DATE
try {
defaultAssetShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE); defaultAssetShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
// Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE // Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE
defaultAssetShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE); defaultAssetShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
} catch (Exception exc) {
// TOOD: on Jenkins the customer row vanishes, locally all tests are green
assertThat(customerService.findOne(asset.getMembership().getCustomer().getId())).as("postcondition failed").isNotNull();
}
} }
@Test @Test