Commit e7a73ad9 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch '90-integration-tests-consume-heap-memory' into 'develop'

Resolve "Integration tests consume heap memory"

See merge request !83
parents 503b40ff fd65a66e
Loading
Loading
Loading
Loading
Loading
+7 −23
Original line number Diff line number Diff line
@@ -281,21 +281,6 @@
			<artifactId>spring-security-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-commons</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-runner</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-inline</artifactId>
@@ -449,20 +434,16 @@
                	<parallel>none</parallel>
                	<runOrder>alphabetical</runOrder>
                	<forkCount>1</forkCount>
                	<reuseForks>false</reuseForks>
                	    <!--
					    <argLine>-Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${project.build.directory}/heap.hprof</argLine>
					    <systemPropertyVariables>
					      <spring.test.context.cache.maxSize>8</spring.test.context.cache.maxSize>
					      <logging.level.org.springframework.test.context.cache>TRACE</logging.level.org.springframework.test.context.cache>
					    </systemPropertyVariables>
          			-->
                	<reuseForks>true</reuseForks>
            	</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.12</version>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<goals>
@@ -483,6 +464,9 @@
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.12</version>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<goals>
+17 −5
Original line number Diff line number Diff line
@@ -91,8 +91,13 @@ public class CatalogCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);

            if (response!=null) {
              logger.info("Successfully sent catalog create event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());   
            } else {
              logger.error("category delete event to callback URL: {} - Response: IS NULL", 
                  url);
            }
            
        } catch (Exception e) {
            logger.error("Failed to send catalog create event to callback URL: {}", url, e);
@@ -115,8 +120,15 @@ public class CatalogCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);
            

            if (response!=null) {
              logger.info("Successfully sent catalog delete event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());        
            } else {
              logger.error("catalog delete event to callback URL: {} - Response: IS NULL", 
                  url);
            }
            
            
        } catch (Exception e) {
            logger.error("Failed to send catalog delete event to callback URL: {}", url, e);
+15 −6
Original line number Diff line number Diff line
@@ -90,8 +90,13 @@ public class CategoryCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);

            if (response!=null) {
              logger.info("Successfully sent category create event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());   
            } else {
              logger.error("category delete event to callback URL: {} - Response: IS NULL", 
                  url);
            }
            
        } catch (Exception e) {
            logger.error("Failed to send category create event to callback URL: {}", callbackUrl, e);
@@ -113,9 +118,13 @@ public class CategoryCallbackService {
            
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);
            
            if (response!=null) {
              logger.info("Successfully sent category delete event to callback URL: {} - Response: {}", 
                  url, response.getStatusCode());             
            } else {
              logger.error("category delete event to callback URL: {} - Response: IS NULL", 
                  url);
            }
            
        } catch (Exception e) {
            logger.error("Failed to send category delete event to callback URL: {}", callbackUrl, e);
+2 −0
Original line number Diff line number Diff line
@@ -107,7 +107,9 @@ public class ProductCategoryRepoService {
		
	}

	@Transactional
	public List<Category> findAll() {
	  this.categsRepo.findByOrderByName().stream().forEach( s->s.getProductOfferingObj().size());
		return (List<Category>) this.categsRepo.findByOrderByName();
	}

+11 −6
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ public class ProductOfferingCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);
            
            if ( response!= null)
              logger.info("Successfully sent product offering create event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());
            
@@ -144,6 +145,7 @@ public class ProductOfferingCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);

            if ( response!= null)
              logger.info("Successfully sent product offering delete event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());
            
@@ -168,6 +170,8 @@ public class ProductOfferingCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);
            

            if ( response!= null)
              logger.info("Successfully sent product offering attribute value change event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());
            
@@ -192,6 +196,7 @@ public class ProductOfferingCallbackService {
            ResponseEntity<String> response = restTemplate.exchange(
                url, HttpMethod.POST, entity, String.class);

            if ( response!= null)
              logger.info("Successfully sent product offering state change event to callback URL: {} - Response: {}", 
                url, response.getStatusCode());
            
Loading