diff --git a/hcatalog/src/test/e2e/hcatalog/build.xml b/hcatalog/src/test/e2e/hcatalog/build.xml
index 8cf7407..16cfbae 100644
--- a/hcatalog/src/test/e2e/hcatalog/build.xml
+++ b/hcatalog/src/test/e2e/hcatalog/build.xml
@@ -262,12 +262,21 @@
+
+
+
+
+
+
+
+
diff --git a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHCat.pm b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHCat.pm
index 724a505..0cf18ac 100644
--- a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHCat.pm
+++ b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHCat.pm
@@ -59,13 +59,13 @@ sub new
sub globalSetup
{
my ($self, $globalHash, $log) = @_;
- my $subName = (caller(0))[3];
-
# Setup the output path
my $me = `whoami`;
chomp $me;
- $globalHash->{'runid'} = $me . "." . time;
+ my $jobId = $globalHash->{'job-id'};
+ my $timeId = time;
+ $globalHash->{'runid'} = $me . "-" . $timeId . "-" . $jobId;
# if "-ignore false" was provided on the command line,
# it means do run tests even when marked as 'ignore'
@@ -76,6 +76,12 @@ sub globalSetup
$globalHash->{'outpath'} = $globalHash->{'outpathbase'} . "/" . $globalHash->{'runid'} . "/";
$globalHash->{'localpath'} = $globalHash->{'localpathbase'} . "/" . $globalHash->{'runid'} . "/";
+ $globalHash->{'tmpPath'} = $globalHash->{'tmpPath'} . "/" . $globalHash->{'runid'} . "/";
+}
+
+sub globalSetupConditional
+{
+ my ($self, $globalHash, $log) = @_;
# add libexec location to the path
if (defined($ENV{'PATH'})) {
diff --git a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHadoop.pm b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHadoop.pm
index ac9b8ec..09c1683 100644
--- a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHadoop.pm
+++ b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHadoop.pm
@@ -56,13 +56,13 @@ sub new
sub globalSetup
{
my ($self, $globalHash, $log) = @_;
- my $subName = (caller(0))[3];
-
# Setup the output path
my $me = `whoami`;
chomp $me;
- $globalHash->{'runid'} = $me . "." . time;
+ my $jobId = $globalHash->{'job-id'};
+ my $timeId = time;
+ $globalHash->{'runid'} = $me . "-" . $timeId . "-" . $jobId;
# if "-ignore false" was provided on the command line,
# it means do run tests even when marked as 'ignore'
@@ -73,6 +73,11 @@ sub globalSetup
$globalHash->{'outpath'} = $globalHash->{'outpathbase'} . "/" . $globalHash->{'runid'} . "/";
$globalHash->{'localpath'} = $globalHash->{'localpathbase'} . "/" . $globalHash->{'runid'} . "/";
+ $globalHash->{'tmpPath'} = $globalHash->{'tmpPath'} . "/" . $globalHash->{'runid'} . "/";
+}
+
+sub globalSetupConditional() {
+ my ($self, $globalHash, $log) = @_;
# add libexec location to the path
if (defined($ENV{'PATH'})) {
diff --git a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHive.pm b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHive.pm
index f0b1206..cce8fea 100644
--- a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHive.pm
+++ b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverHive.pm
@@ -57,14 +57,16 @@ sub new
sub globalSetup
{
my ($self, $globalHash, $log) = @_;
- my $subName = (caller(0))[3];
# Setup the output path
my $me = `whoami`;
chomp $me;
- $globalHash->{'runid'} = $me . "." . time;
+ my $jobId = $globalHash->{'job-id'};
+ my $timeId = time;
+ $globalHash->{'runid'} = $me . "-" . $timeId . "-" . $jobId;
$globalHash->{'localpath'} = $globalHash->{'localpathbase'} . "/" . $globalHash->{'runid'} . "/";
+ $globalHash->{'tmpPath'} = $globalHash->{'tmpPath'} . "/" . $globalHash->{'runid'} . "/";
IPC::Run::run(['mkdir', '-p', $globalHash->{'localpath'}], \undef, $log, $log) or
die "Cannot create localpath directory " . $globalHash->{'localpath'} .
diff --git a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverPig.pm b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverPig.pm
index facaa7d..7dca963 100644
--- a/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverPig.pm
+++ b/hcatalog/src/test/e2e/hcatalog/drivers/TestDriverPig.pm
@@ -56,13 +56,13 @@ sub new
sub globalSetup
{
my ($self, $globalHash, $log) = @_;
- my $subName = (caller(0))[3];
-
# Setup the output path
my $me = `whoami`;
chomp $me;
- $globalHash->{'runid'} = $me . "." . time;
+ my $jobId = $globalHash->{'job-id'};
+ my $timeId = time;
+ $globalHash->{'runid'} = $me . "-" . $timeId . "-" . $jobId;
# if "-ignore false" was provided on the command line,
# it means do run tests even when marked as 'ignore'
@@ -73,6 +73,12 @@ sub globalSetup
$globalHash->{'outpath'} = $globalHash->{'outpathbase'} . "/" . $globalHash->{'runid'} . "/";
$globalHash->{'localpath'} = $globalHash->{'localpathbase'} . "/" . $globalHash->{'runid'} . "/";
+ $globalHash->{'tmpPath'} = $globalHash->{'tmpPath'} . "/" . $globalHash->{'runid'} . "/";
+}
+
+sub globalSetupConditional
+{
+ my ($self, $globalHash, $log) = @_;
# add libexec location to the path
if (defined($ENV{'PATH'})) {
@@ -109,6 +115,12 @@ sub globalSetup
sub globalCleanup
{
+ # noop there because the removal of temp directories, which are created in #globalSetupConditional(), is to be
+ # performed in method #globalCleanupConditional().
+}
+
+sub globalCleanupConditional
+{
my ($self, $globalHash, $log) = @_;
IPC::Run::run(['rm', '-rf', $globalHash->{'tmpPath'}], \undef, $log, $log) or
diff --git a/hcatalog/src/test/e2e/templeton/build.xml b/hcatalog/src/test/e2e/templeton/build.xml
index 4bce25b..67968a3 100644
--- a/hcatalog/src/test/e2e/templeton/build.xml
+++ b/hcatalog/src/test/e2e/templeton/build.xml
@@ -82,6 +82,11 @@
+
+
+
+
@@ -90,6 +95,9 @@
+
+
+
@@ -103,6 +111,11 @@
+
+
+
+
@@ -111,6 +124,9 @@
+
+
+
diff --git a/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm b/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm
index df7c6b2..1e7cf36 100644
--- a/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm
+++ b/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm
@@ -150,13 +150,13 @@ sub new
sub globalSetup
{
my ($self, $globalHash, $log) = @_;
- my $subName = (caller(0))[3];
-
# Setup the output path
my $me = `whoami`;
chomp $me;
- $globalHash->{'runid'} = $me . "." . time;
+ my $jobId = $globalHash->{'job-id'};
+ my $timeId = time;
+ $globalHash->{'runid'} = $me . "-" . $timeId . "-" . $jobId;
# if "-ignore false" was provided on the command line,
# it means do run tests even when marked as 'ignore'
@@ -170,6 +170,7 @@ sub globalSetup
$globalHash->{'outpath'} = $globalHash->{'outpathbase'} . "/" . $globalHash->{'runid'} . "/";
$globalHash->{'localpath'} = $globalHash->{'localpathbase'} . "/" . $globalHash->{'runid'} . "/";
+ $globalHash->{'tmpPath'} = $globalHash->{'tmpPath'} . "/" . $globalHash->{'runid'} . "/";
$globalHash->{'webhdfs_url'} = $ENV{'WEBHDFS_URL'};
$globalHash->{'templeton_url'} = $ENV{'TEMPLETON_URL'};
$globalHash->{'current_user'} = $ENV{'USER_NAME'};
@@ -184,6 +185,11 @@ sub globalSetup
$globalHash->{'inpdir_hdfs'} = $ENV{'TH_INPDIR_HDFS'};
$globalHash->{'is_secure_mode'} = $ENV{'SECURE_MODE'};
+ }
+
+sub globalSetupConditional
+ {
+ my ($self, $globalHash, $log) = @_;
# add libexec location to the path
if (defined($ENV{'PATH'})) {
@@ -218,6 +224,12 @@ sub globalSetup
# None
sub globalCleanup
{
+ # noop there because the removal of temp directories, which are created in #globalSetupConditional(), is to be
+ # performed in method #globalCleanupConditional().
+ }
+
+sub globalCleanupConditional
+ {
my ($self, $globalHash, $log) = @_;
IPC::Run::run(['rm', '-rf', $globalHash->{'tmpPath'}], \undef, $log, $log) or