Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@irinaepshteyn
Copy link
Collaborator

  • Removed duplicate plugin configurations.
  • Renamed profiles to better reflect their purpose.

@irinaepshteyn
Copy link
Collaborator Author

Final maven profiles and plugin configurations in service/pom.xml:

public (Default) 

  • maven-compiler-plugin: exclude audit and audit tests    
  • maven-surefire-plugin:
    -- report directory: surefire-reports
    -- SPRING_ACTIVE_PROFILES = h2,public,simple-cache
  • maven-failsafe-plugin:
    -- report directory: surefire-reports
    --SPRING_ACTIVE_PROFILES = h2,public,simple-cache
    -- exclude controller tests for graph

public-titan

  • maven-compiler-plugin: exclude audit and audit tests    
  • maven-surefire-plugin:
    -- report directory: surefire-reports-titan
    -- SPRING_ACTIVE_PROFILES = h2,public,simple-cache,titan
  • maven-failsafe-plugin:
    -- report directory: surefire-reports-titan
    -- SPRING_ACTIVE_PROFILES = h2,public,simple-cache,titan
    -- exclude non-hierarchical controller tests

predix-titan

  • maven-surefire-plugin:
    -- report directory: surefire-reports-titan
    -- SPRING_ACTIVE_PROFILES = h2,public,simple-cache,titan
  • maven-failsafe-plugin:
    -- report directory: surefire-reports-titan
    -- SPRING_ACTIVE_PROFILES = h2,public,simple-cache,titan
    -- exclude non-hierarchical controller tests

@anubhavi25
Copy link
Contributor

anubhavi25 commented Sep 12, 2017

Update: After talking to @irinaepshteyn about this, if no test code uses beans conditionally wired by the predix profile, this comment can be ignored and we can go with the original approach mentioned in the comment above

Unless I'm missing something, shouldn't we change the Predix-related Maven profiles to the following?:

Maven profile: predix

  • Report directory: surefire-reports
  • Active Spring profiles: SPRING_ACTIVE_PROFILES=h2,predix,simple-cache

Maven profile: predix-titan

  • Report directory: surefire-reports-titan
  • Active Spring profiles: SPRING_ACTIVE_PROFILES=h2,predix,simple-cache,titan

Key things here are:

  • Add the predix Maven profile
  • Use the predix instead of the public Spring profile for all Predix-related Maven profiles so that all Predix-related integration test Maven profiles (predix-{local,cloud}, predix-{local,cloud}-titan) use a version of ACS built with the predix Spring profile

@anubhavi25
Copy link
Contributor

Also please include the story number in either the pull request title or the commit message so it's easy to track what happened from just looking at the commit history on the base branch.

- Removed duplicate plugin configurations.
- Renamed profiles to better reflect their purpose.
@irinaepshteyn
Copy link
Collaborator Author

irinaepshteyn commented Sep 12, 2017

@anubhavi25, as discussed earlier, predix spring profile is not required for ACS service unit and controller tests as it will wire predix related beans (metering, zac token service, etc.). This functionality is covered by the corresponding integration tests.

However, predix maven profile is required to compile and run unit tests for audit.

If you agree, please approve the pull request.

Copy link
Contributor

@anubhavi25 anubhavi25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rerun the pull request pipeline since the latest rebase includes changes that were not tested (i.e. service/src/test/java/com/ge/predix/controller/test/ConfigureEnvironment.java differs from the file in the workspace of the build related to this PR: https://predix1.jenkins.build.ge.com/job/Predix-Security/job/ACS/job/ACS-PullRequest/job/acs-build-pullrequest/ws/service/src/test/java/com/ge/predix/controller/test/ConfigureEnvironment.java/*view*/ ).

If tests pass, feel free to merge this in.

@irinaepshteyn irinaepshteyn changed the title Refactored service POM to isolate predix profile. US161387: Refactored service POM to isolate predix profile. Sep 13, 2017
@irinaepshteyn irinaepshteyn merged commit ea4cf03 into develop Sep 13, 2017
@irinaepshteyn irinaepshteyn deleted the US161387 branch September 13, 2017 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants