You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by tu...@apache.org on 2012/09/07 02:24:32 UTC
svn commit: r1381819 - in /incubator/oozie/trunk:
core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
release-log.txt
Author: tucu
Date: Fri Sep 7 00:24:31 2012
New Revision: 1381819
URL: http://svn.apache.org/viewvc?rev=1381819&view=rev
Log:
OOZIE-988 Improve verification of TestJavaActionExecutor.testLibFileArchives (rkanter via tucu)
Modified:
incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
incubator/oozie/trunk/release-log.txt
Modified: incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java?rev=1381819&r1=1381818&r2=1381819&view=diff
==============================================================================
--- incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java (original)
+++ incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java Fri Sep 7 00:24:31 2012
@@ -676,33 +676,48 @@ public class TestJavaActionExecutor exte
assertTrue(DistributedCache.getSymlink(jobConf));
Path[] filesInClasspath = DistributedCache.getFileClassPaths(jobConf);
- boolean hasMrappsJar = false;
- for (Path path : filesInClasspath) {
- if (path.getName().equals("MRAppJar.jar")) {
- hasMrappsJar = true;
+ for (Path p : new Path[]{new Path(getAppPath(), jar), rootJar}) {
+ boolean found = false;
+ for (Path c : filesInClasspath) {
+ if (!found && p.toUri().getPath().equals(c.toUri().getPath())) {
+ found = true;
+ }
}
+ assertTrue("file " + p.toUri().getPath() + " not found in classpath", found);
}
- if (hasMrappsJar) {
- // we need to do this because of MR2 injecting a JAR on the client side.
- // MRAppJar JAR, 1 launcher JAR, 1 wf lib JAR, 2 <file> JARs
- assertEquals(5, filesInClasspath.length);
+ for (Path p : new Path[]{new Path(getAppPath(), file), rootFile, new Path(getAppPath(), so), rootSo,
+ new Path(getAppPath(), so1), rootSo1}) {
+ boolean found = false;
+ for (Path c : filesInClasspath) {
+ if (!found && p.toUri().getPath().equals(c.toUri().getPath())) {
+ found = true;
+ }
+ }
+ assertFalse("file " + p.toUri().getPath() + " found in classpath", found);
}
- else {
- // 1 launcher JAR, 1 wf lib JAR, 2 <file> JARs
- assertEquals(4, filesInClasspath.length);
+ URI[] filesInCache = DistributedCache.getCacheFiles(jobConf);
+ for (Path p : new Path[]{new Path(getAppPath(), jar), rootJar, new Path(getAppPath(), file), rootFile,
+ new Path(getAppPath(), so), rootSo, new Path(getAppPath(), so1), rootSo1}) {
+ boolean found = false;
+ for (URI c : filesInCache) {
+ if (!found && p.toUri().getPath().equals(c.getPath())) {
+ found = true;
+ }
+ }
+ assertTrue("file " + p.toUri().getPath() + " not found in cache", found);
}
- if (hasMrappsJar) {
- // we need to do this because of MR2 injecting a JAR on the client side.
- // #CLASSPATH_ENTRIES# 5 (4+MRAppJar), 1 wf lib sos, 4 <file> sos, 2 <file> files
- assertEquals(12, DistributedCache.getCacheFiles(jobConf).length);
- }
- else {
- // #CLASSPATH_ENTRIES# 4, 1 wf lib sos, 4 <file> sos, 2 <file> files
- assertEquals(11, DistributedCache.getCacheFiles(jobConf).length);
+
+ URI[] archivesInCache = DistributedCache.getCacheArchives(jobConf);
+ for (Path p : new Path[]{new Path(getAppPath(), archive), rootArchive}) {
+ boolean found = false;
+ for (URI c : archivesInCache) {
+ if (!found && p.toUri().getPath().equals(c.getPath())) {
+ found = true;
+ }
+ }
+ assertTrue("archive " + p.toUri().getPath() + " not found in cache", found);
}
- // 2 <archive> files
- assertEquals(2, DistributedCache.getCacheArchives(jobConf).length);
}
public void testPrepare() throws Exception {
Modified: incubator/oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1381819&r1=1381818&r2=1381819&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Fri Sep 7 00:24:31 2012
@@ -1,5 +1,6 @@
-- Oozie 3.4.0 release (trunk - unreleased)
+OOZIE-988 Improve verification of TestJavaActionExecutor.testLibFileArchives (rkanter via tucu)
OOZIE-973 Allow Oozie to run against Hadoop trunk branch (rkanter via tucu)
OOZIE-975 Test cases should not load all the services classes (virag)
OOZIE-984 Allow EL Functions in Coordinator timeout (rkanter via tucu)