Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GS-Test

Average time to resolve an issue Percentage of issues still open

The GS-Test library contains utilities designed to simplify testing of applications implemented using GigaSpaces.

Running an embedded Processing Unit

The PuConfigurers class contains factory methods for builders for different types of processing units (partitioned pu, mirror pu). Those can be used to create an embedded processing unit (RunningPu). The RunningPu extends the org.junit.rules.TestRule interface which makes it easy to run a processing unit "around" either an entire test class using @ClassRule, or around each test case using @Rule.

Example: Using @Rule and RunningPu to start/stop a pu around each test case
class FruitTest {
  @Rule
  public RunningPu fruitPu = PuConfigurers.partitionedPu("classpath:/fruit-pu.xml")
                                   .configure();
                                   
  // Test cases against fruitPu
}
Example: Starting/stopping a Pu explicitly
class FruitTest {

  RunningPu fruitPu = PuConfigurers.partitionedPu("classpath:/fruit-pu.xml")
                                   .configure();
  
  @Before                                 
  public void startFruitPu() {
      fruitPu.start();
  }
  
  @After                                 
  public void stopFruitPu() {
      fruitPu.stop();
  }
                                   
  // Test cases against fruitPu
}

Maven

GS-Test packed as a single jar file. Maven users can get GS-Test using the following coordinates:

<dependency>
  <groupId>com.avanza.gs</groupId>
  <artifactId>gs-test</artifactId>
  <version>0.1.0</version>
</dependency>

License

The GS-Test library is released under version 2.0 of the Apache License.

About

GS-Test is a set of utilities designed to simplify unit testing of applications implemented using GigaSpaces

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages