trying to find reason for failing tests in Jenkins, locally all tests are green
This commit is contained in:
parent
d81b71cd3a
commit
318ecd0be4
@ -7,6 +7,7 @@ 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;
|
||||||
@ -60,6 +61,9 @@ 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;
|
||||||
|
|
||||||
@ -120,6 +124,7 @@ 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;
|
||||||
}
|
}
|
||||||
@ -144,9 +149,13 @@ 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
|
||||||
@ -311,10 +320,15 @@ 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
|
||||||
defaultAssetShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
try {
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user