Author: rkanter
Date: Mon Feb 4 17:55:01 2013
New Revision: 1442208
URL: http://svn.apache.org/viewvc?rev=1442208&view=rev
Log:
OOZIE-988 Improve verification of TestJavaActionExecutor.testLibFileArchives
(rkanter via tucu)
Modified:
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
oozie/branches/branch-3.3/release-log.txt
Modified:
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java?rev=1442208&r1=1442207&r2=1442208&view=diff
==============================================================================
---
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
(original)
+++
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java
Mon Feb 4 17:55:01 2013
@@ -680,33 +680,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: oozie/branches/branch-3.3/release-log.txt
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-3.3/release-log.txt?rev=1442208&r1=1442207&r2=1442208&view=diff
==============================================================================
--- oozie/branches/branch-3.3/release-log.txt (original)
+++ oozie/branches/branch-3.3/release-log.txt Mon Feb 4 17:55:01 2013
@@ -1,5 +1,6 @@
-- Oozie 3.3.2 (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-984 Allow EL Functions in Coordinator timeout (rkanter via tucu)
OOZIE-972 Provide EL function to append a string in each substring of another
string separated by delimiter (kamrul via virag)