[ 
https://issues.apache.org/jira/browse/RYA-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059783#comment-16059783
 ] 

ASF GitHub Bot commented on RYA-304:
------------------------------------

Github user jessehatfield commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/173#discussion_r123583040
  
    --- Diff: 
extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/RulesetCopyIT.java
 ---
    @@ -144,32 +146,33 @@ private static RyaType literal(final String lit, 
final URI type) {
     
         @BeforeClass
         public static void setUpPerClass() throws Exception {
    +        DemoUtilities.setupLogging(LoggingDetail.LIGHT);
             accumuloDualInstanceDriver = new 
AccumuloDualInstanceDriver(IS_MOCK, true, true, false, false);
             accumuloDualInstanceDriver.setUpInstances();
         }
     
         @Before
         public void setUpPerTest() throws Exception {
    -        parentConfig = accumuloDualInstanceDriver.getParentConfig();
    -        childConfig = accumuloDualInstanceDriver.getChildConfig();
    -        accumuloDualInstanceDriver.setUpTables();
             accumuloDualInstanceDriver.setUpConfigs();
    +        accumuloDualInstanceDriver.setUpTables();
             accumuloDualInstanceDriver.setUpDaos();
    +        parentConfig = accumuloDualInstanceDriver.getParentConfig();
    +        childConfig = accumuloDualInstanceDriver.getChildConfig();
             parentDao = accumuloDualInstanceDriver.getParentDao();
         }
     
         @After
         public void tearDownPerTest() throws Exception {
             log.info("tearDownPerTest(): tearing down now.");
    -        accumuloDualInstanceDriver.tearDownDaos();
             accumuloDualInstanceDriver.tearDownTables();
    +        accumuloDualInstanceDriver.tearDownDaos();
    +        if (rulesetTool != null) {
    +            rulesetTool.shutdown();
    +        }
         }
     
         @AfterClass
         public static void tearDownPerClass() throws Exception {
    -        if (rulesetTool != null) {
    -            rulesetTool.shutdown();
    -        }
             accumuloDualInstanceDriver.tearDown();
    --- End diff --
    
    Oh, I suppose there are two parts: The AccumuloDualInstanceDriver is 
initialized once per class, and in turn initializes the parent MAC. But the 
child MAC is instead initialized when the tool is run (via 
CopyTool.createChildInstance), which is once per test. Calling 
rulesetTool.shutdown() will close the child instance (but not the parent). 
Previously, this shutdown call was only being made once per class, so the extra 
child MACs weren't being shut down between tests. This PR fixes that by moving 
that call into the per-test shutdown. This leaves the parent MAC open between 
tests (hence the minimum 5 processes), but there's only ever one parent MAC 
(the one that was initialized by the AccumuloDualInstanceDriver) and it does 
get shut down at the end, so we don't have these extraneous processes. So I 
believe this PR solves the problem.


> Fix rya.merger Integration Tests
> --------------------------------
>
>                 Key: RYA-304
>                 URL: https://issues.apache.org/jira/browse/RYA-304
>             Project: Rya
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.2.10
>            Reporter: Eric White
>            Assignee: Eric White
>             Fix For: 3.2.10
>
>
> The integration tests for rya.merger are failing.  The test that is failing 
> is for RulesetCopyIT



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to