Jira: https://issues.apache.org/jira/browse/OOZIE-2829
Build: https://builds.apache.org/job/PreCommit-OOZIE-Build/630/

###################################################################################
########################## LAST 100 LINES OF THE CONSOLE 
###########################
[...truncated 786.11 KB...]
        // test files in new folder

        for (int i = 0; i < testFiles; i++) {
            String fileName = generateFileName(i);
            String expectedFileContent = generateFileContent(i);
            InputStream in = null;
            try {
                in = fs.open(new Path(latestLibPath, fileName));
                String actualFileContent = IOUtils.toString(in);
                assertEquals(fileName, expectedFileContent, actualFileContent);
            } finally {
                IOUtils.closeQuietly(in);
            }
        }

    }

    /**
     * test fake command
     */
    public void testFakeCommand() throws Exception {

        ByteArrayOutputStream data = new ByteArrayOutputStream();
        PrintStream oldPrintStream = System.err;
        System.setErr(new PrintStream(data));
        try {
            String[] argsFake = { "fakeCommand" };
            assertEquals(1, execOozieSharelibCLICommands(argsFake));
            assertTrue(data.toString().contains("Invalid sub-command: invalid 
sub-command [fakeCommand]"));
            assertTrue(data.toString().contains("use 'help [sub-command]' for 
help details"));
        }
        finally {
            System.setErr(oldPrintStream);
        }

    }

    private FileSystem getTargetFileSysyem() throws Exception {
        if (fs == null) {
            HadoopAccessorService has = 
getServices().get(HadoopAccessorService.class);
            URI uri = new Path(outPath).toUri();
            Configuration fsConf = has.createJobConf(uri.getAuthority());
            fs = has.createFileSystem(System.getProperty("user.name"), uri, 
fsConf);
        }
        return fs;

    }

    private Services getServices() throws ServiceException {
        if (services == null) {
            services = new Services();
            services.getConf()
                    
.set(Services.CONF_SERVICE_CLASSES,"org.apache.oozie.service.LiteWorkflowAppService,"
                            + "org.apache.oozie.service.SchedulerService,"
                            + "org.apache.oozie.service.HadoopAccessorService,"
                            + "org.apache.oozie.service.ShareLibService");
            services.init();
        }
        return services;
    }

    private Path getDistPath() throws Exception {
        if (dstPath == null) {
            WorkflowAppService lwas = 
getServices().get(WorkflowAppService.class);
            dstPath = lwas.getSystemLibPath();
        }
        return dstPath;
    }

    private void writeFile(File folder, String filename, String content) throws 
Exception {
        File file = new File(folder.getAbsolutePath() + File.separator + 
filename);
        Writer writer = new FileWriter(file);
        writer.write(content);
        writer.flush();
        writer.close();

    }

    private int execOozieSharelibCLICommands(String[] args) throws Exception {

error: patch failed: 
tools/src/test/java/org/apache/oozie/tools/TestOozieSharelibCLI.java:19
error: tools/src/test/java/org/apache/oozie/tools/TestOozieSharelibCLI.java: 
patch does not apply
Patch failed to apply to head of branch

Adding comment to JIRA
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     
0100  1774    0  1575  100   199   1828    231 --:--:-- --:--:-- --:--:--  1829
{"self":"https://issues.apache.org/jira/rest/api/2/issue/13056997/comment/16515676","id":"16515676","author":{"self":"https://issues.apache.org/jira/rest/api/2/user?username=hadoopqa","name":"hadoopqa","key":"hadoopqa","avatarUrls":{"48x48":"https://issues.apache.org/jira/secure/useravatar?ownerId=hadoopqa&avatarId=10393","24x24":"https://issues.apache.org/jira/secure/useravatar?size=small&ownerId=hadoopqa&avatarId=10393","16x16":"https://issues.apache.org/jira/secure/useravatar?size=xsmall&ownerId=hadoopqa&avatarId=10393","32x32":"https://issues.apache.org/jira/secure/useravatar?size=medium&ownerId=hadoopqa&avatarId=10393"},"displayName":"Hadoop
 QA","active":true,"timeZone":"Etc/UTC"},"body":"\nTesting JIRA 
OOZIE-2829\n\nCleaning local git 
workspace\n\n----------------------------\n\n{color:red}-1{color} Patch failed 
to apply to head of 
branch\n\n----------------------------\n","updateAuthor":{"self":"https://issues.apache.org/jira/rest/api/2/user?username=hadoopqa","name":"hadoopqa","key":"hadoopqa","avatarUrls":{"48x48":"https://issues.apache.org/jira/secure/useravatar?ownerId=hadoopqa&avatarId=10393","24x24":"https://issues.apache.org/jira/secure/useravatar?size=small&ownerId=hadoopqa&avatarId=10393","16x16":"https://issues.apache.org/jira/secure/useravatar?size=xsmall&ownerId=hadoopqa&avatarId=10393","32x32":"https://issues.apache.org/jira/secure/useravatar?size=medium&ownerId=hadoopqa&avatarId=10393"},"displayName":"Hadoop
 
QA","active":true,"timeZone":"Etc/UTC"},"created":"2018-06-18T13:09:04.272+0000","updated":"2018-06-18T13:09:04.272+0000"}
test-patch exit code: 1

Build step 'Execute shell' marked build as failure
[description-setter] Description set: OOZIE-2829
Archiving artifacts
[Fast Archiver] Compressed 925.98 KB of artifacts by 72.6% relative to #627
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###################################################################################
############################## FAILED TESTS (if any) 
##############################
No tests ran.

Reply via email to