incubator-oozie-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1208128 - in /incubator/oozie/trunk: core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java release-log.txt
Date Tue, 29 Nov 2011 23:12:55 GMT
Author: tucu
Date: Tue Nov 29 23:12:54 2011
New Revision: 1208128

URL: http://svn.apache.org/viewvc?rev=1208128&view=rev
Log:
OOZIE-622. Remove system sharelib tests from TestLiteWorkflowAppService. (tucu)

Modified:
    incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java
    incubator/oozie/trunk/release-log.txt

Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java?rev=1208128&r1=1208127&r2=1208128&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java
(original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/service/TestLiteWorkflowAppService.java
Tue Nov 29 23:12:54 2011
@@ -425,135 +425,6 @@ public class TestLiteWorkflowAppService 
         }
     }
 
-    public void testCreateprotoConfWithSystemLibPath() throws Exception {
-        String systemLibPath = createTestCaseSubDir("syslib");
-        setSystemProperty(WorkflowAppService.SYSTEM_LIB_PATH, systemLibPath);
-        Services services = new Services();
-        try {
-            services.init();
-            Writer writer;
-            writer = new FileWriter(systemLibPath + "/maputilsys.jar");
-            writer.write("bla bla");
-            writer.close();
-            new Services().init();
-
-            Reader reader = IOUtils.getResourceAsReader("wf-schema-valid.xml", -1);
-            writer = new FileWriter(getTestCaseDir() + "/workflow.xml");
-            IOUtils.copyCharStream(reader, writer);
-
-            createTestCaseSubDir("lib");
-            writer = new FileWriter(getTestCaseDir() + "/lib/maputil.jar");
-            writer.write("bla bla");
-            writer.close();
-            writer = new FileWriter(getTestCaseDir() + "/lib/reduceutil.so");
-            writer.write("bla bla");
-            writer.close();
-            createTestCaseSubDir("libx");
-            writer = new FileWriter(getTestCaseDir() + "/libx/maputilx.jar");
-            writer.write("bla bla");
-            writer.close();
-
-            // without using system libpath
-            WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
-            Configuration jobConf = new XConfiguration();
-            jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + "/workflow.xml");
-            jobConf.set(OozieClient.LIBPATH, "file://" + getTestCaseDir() + "/libx");
-            jobConf.set(OozieClient.USER_NAME, getTestUser());
-            jobConf.set(OozieClient.GROUP_NAME, getTestGroup());
-            injectKerberosInfo(jobConf);
-            Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
-            assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
-            assertEquals(getTestGroup(), protoConf.get(OozieClient.GROUP_NAME));
-
-            assertEquals(3, protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST).length);
-            List<String> found = new ArrayList<String>();
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[0]);
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[1]);
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[2]);
-            List<String> expected = new ArrayList<String>();
-            expected.add(getTestCaseDir() + "/lib/reduceutil.so");
-            expected.add(getTestCaseDir() + "/lib/maputil.jar");
-            expected.add(getTestCaseDir() + "/libx/maputilx.jar");
-            Collections.sort(found);
-            Collections.sort(expected);
-            assertEquals(expected, found);
-
-            // using system libpath
-            wps = Services.get().get(WorkflowAppService.class);
-            jobConf = new XConfiguration();
-            jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + "/workflow.xml");
-            jobConf.set(OozieClient.LIBPATH, "file://" + getTestCaseDir() + "/libx");
-            jobConf.set(OozieClient.USER_NAME, getTestUser());
-            jobConf.set(OozieClient.GROUP_NAME, getTestGroup());
-            jobConf.setBoolean(OozieClient.USE_SYSTEM_LIBPATH, true);
-            injectKerberosInfo(jobConf);
-            protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
-            assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
-            assertEquals(getTestGroup(), protoConf.get(OozieClient.GROUP_NAME));
-
-            assertEquals(4, protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST).length);
-            found = new ArrayList<String>();
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[0]);
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[1]);
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[2]);
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[3]);
-            expected = new ArrayList<String>();
-            expected.add(getTestCaseDir() + "/lib/reduceutil.so");
-            expected.add(getTestCaseDir() + "/lib/maputil.jar");
-            expected.add(getTestCaseDir() + "/libx/maputilx.jar");
-            expected.add(getTestCaseDir() + "/syslib/maputilsys.jar");
-            Collections.sort(found);
-            Collections.sort(expected);
-            assertEquals(expected, found);
-        }
-        finally {
-            services.destroy();
-        }
-    }
-
-    public void testCreateprotoConfWithMissingSystemLibPath() throws Exception {
-        setSystemProperty(WorkflowAppService.SYSTEM_LIB_PATH, getTestCaseDir() + "/missingsyslib");
-        Services services = new Services();
-        try {
-            services.init();
-            new Services().init();
-
-            Writer writer;
-            Reader reader = IOUtils.getResourceAsReader("wf-schema-valid.xml", -1);
-            writer = new FileWriter(getTestCaseDir() + "/workflow.xml");
-            IOUtils.copyCharStream(reader, writer);
-
-            createTestCaseSubDir("lib");
-            writer = new FileWriter(getTestCaseDir() + "/lib/maputil.jar");
-            writer.write("bla bla");
-            writer.close();
-
-            // using missing system libpath
-            WorkflowAppService wps = Services.get().get(WorkflowAppService.class);
-            Configuration jobConf = new XConfiguration();
-            jobConf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + "/workflow.xml");
-            jobConf.set(OozieClient.USER_NAME, getTestUser());
-            jobConf.set(OozieClient.GROUP_NAME, getTestGroup());
-            jobConf.setBoolean(OozieClient.USE_SYSTEM_LIBPATH, true);
-            injectKerberosInfo(jobConf);
-            Configuration protoConf = wps.createProtoActionConf(jobConf, "authToken", true);
-            assertEquals(getTestUser(), protoConf.get(OozieClient.USER_NAME));
-            assertEquals(getTestGroup(), protoConf.get(OozieClient.GROUP_NAME));
-
-            assertEquals(1, protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST).length);
-            List<String> found = new ArrayList<String>();
-            found.add(protoConf.getStrings(WorkflowAppService.APP_LIB_PATH_LIST)[0]);
-            List<String> expected = new ArrayList<String>();
-            expected.add(getTestCaseDir() + "/lib/maputil.jar");
-            Collections.sort(found);
-            Collections.sort(expected);
-            assertEquals(expected, found);
-        }
-        finally {
-            services.destroy();
-        }
-    }
-
     public void testCreateprotoConfWithSubWorkflow_Case1_ParentWorkflowContainingLibs() throws
Exception {
         // When parent workflow has an non-empty lib directory,
         // APP_LIB_PATH_LIST should contain libraries from both parent and

Modified: incubator/oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1208128&r1=1208127&r2=1208128&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Tue Nov 29 23:12:54 2011
@@ -1,5 +1,6 @@
 -- Oozie 3.2.0 release
 
+OOZIE-622. Remove system sharelib tests from TestLiteWorkflowAppService. (tucu)
 OOZIE-68 Add Hive action. (tucu)
 OOZIE-608 Fix test failure for testCoordChangeXCommand, testCoordChangeEndTime Unit
 OOZIE-610 Oozie system share lib should have jars per action type. (tucu)



Mime
View raw message