This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* main spring boot integration test with integration test profile | |
*/ | |
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | |
@ActiveProfiles("INTEGRATION_TEST") | |
@ContextConfiguration | |
public class CucumberRoot { | |
@Autowired | |
protected TestRestTemplate template; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* how the feature is executed | |
*/ | |
public class GetHealthStep extends CucumberRoot { | |
private ResponseEntity<String> response; // output | |
@When("^the client calls /health$") | |
public void the_client_issues_GET_health() throws Throwable { | |
response = template.getForEntity("/health", String.class); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage('Integration tests') { | |
// Run the maven build | |
steps { | |
script { | |
def mvnHome = tool 'Maven 3.3.9' | |
if (isUnix()) { | |
// to skip unit testing execution | |
sh "'${mvnHome}/bin/mvn' verify -Dunit-tests.skip=true" | |
} else { | |
bat(/"${mvnHome}\bin\mvn" verify -Dunit-tests.skip=true/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
// run on jenkins nodes tha has java 8 label | |
agent { label 'java8' } | |
// global env variables | |
environment { | |
EMAIL_RECIPIENTS = '[email protected]' | |
} | |
stages { | |
stage('Build with unit testing') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
# change the application name for your project name , this name is reserved for the maven archetype code generation | |
application: | |
name: Application | |
--- | |
# DO NOT FORGET TO ADD YOUR YAML CONFIG FILE IN config server as shown below | |
spring: | |
cloud: | |
config: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. ____ _ __ _ _ | |
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
\\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
' |____| .__|_| |_|_| |_\__, | / / / / | |
=========|_|==============|___/=/_/_/_/ | |
:: Spring Boot :: (v1.5.6.RELEASE) | |
[2017-12-03 19:48:24] [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2c2db130: startup date [Sun Dec 03 19:48:24 CET 2017]; root of context hierarchy | |
[2017-12-03 19:48:24] [main] INFO o.s.c.c.s.e.NativeEnvironmentRepository - Adding property source: file:/var/folders/dl/660f5pxs0q18dmp4zh0smfgh0000gn/T/config-repo-5816360046828309118/Application.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* the main ignite journal plugin implementation based into AsyncWriteJournal | |
*/ | |
@Slf4j | |
public class IgniteWriteJournal extends AsyncWriteJournal { | |
private final Serializer serializer; | |
private final Store<JournalItem> storage; | |
private final IgniteCache<Long, JournalItem> cache; | |
private final IgniteCache<String, Long> sequenceNumberTrack; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* the main ignite snapshot implementation based into SnapshotStore | |
*/ | |
@Slf4j | |
public class IgniteSnapshotStore extends SnapshotStore { | |
private final Serializer serializer; | |
private final Store<SnapshotItem> storage; | |
private final IgniteCache<Long, SnapshotItem> cache; | |
private final BiFunction<Config, ActorSystem, IgniteCache<Long, SnapshotItem>> snapshotCacheProvider = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* a fail fast map reducer to decide if it should keep waiting for other jobs to final reduce or it should terminate | |
* and fail fast with the current responses if any failed | |
*/ | |
@Component | |
@Scope("prototype") | |
public class FailFastReducer implements IgniteReducer<ServiceResponse, MapReduceResponse> { | |
private final Map<String, ServiceResponse> responseMap = new ConcurrentHashMap<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* generic utility class for map reduce call | |
*/ | |
@Component | |
public class DataGridCompute { | |
@Autowired | |
private Ignite ignite; | |
/** |