Skip to content

Commit

Permalink
Workaroud eclipse bug/misfeature: it includes the test code from incl…
Browse files Browse the repository at this point in the history
…uded projects in the runtime of other projects. Use spring profiles to exclude some test workflows from autoscan
  • Loading branch information
gmokki committed Apr 1, 2015
1 parent 2fc49ef commit a8bcb97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static com.nitorcreations.nflow.engine.workflow.definition.NextAction.moveToState;

import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import com.nitorcreations.nflow.engine.workflow.definition.NextAction;
Expand All @@ -10,6 +11,7 @@
import com.nitorcreations.nflow.engine.workflow.definition.WorkflowStateType;

@Component
@Profile("nflow-engine-test")
public class SpringDummyTestWorkflow extends WorkflowDefinition<SpringDummyTestWorkflow.SpringDummyTestState> {

public static enum SpringDummyTestState implements com.nitorcreations.nflow.engine.workflow.definition.WorkflowState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
import com.nitorcreations.nflow.engine.workflow.definition.WorkflowState;

@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles("test")
@ActiveProfiles("nflow-engine-test")
@ContextConfiguration(loader = AnnotationConfigContextLoader.class)
public class WorkflowDefinitionServiceWithSpringTest {

@Configuration
@Profile("test")
@Profile("nflow-engine-test")
@ComponentScan(basePackageClasses = SpringDummyTestWorkflow.class)
static class ContextConfiguration {
@Bean
Expand Down

0 comments on commit a8bcb97

Please sign in to comment.