[ 
https://issues.apache.org/jira/browse/PHOENIX-7081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17817221#comment-17817221
 ] 

ASF GitHub Bot commented on PHOENIX-7081:
-----------------------------------------

stoty commented on code in PR #1808:
URL: https://github.com/apache/phoenix/pull/1808#discussion_r1488966585


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java:
##########
@@ -167,9 +167,9 @@ public static synchronized void setup(
             //Maybe we're gonna have to refactor the namespace
             if(clusterInitialized) {
                 tearDownMiniCluster(0);
-                System.setProperty("java.io.tmpdir", tmpDir);
+                System.setProperty("java.io.tmpdir", tmpPath);

Review Comment:
   and the old variable name reflects this better.



##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java:
##########
@@ -167,9 +167,9 @@ public static synchronized void setup(
             //Maybe we're gonna have to refactor the namespace
             if(clusterInitialized) {
                 tearDownMiniCluster(0);
-                System.setProperty("java.io.tmpdir", tmpDir);
+                System.setProperty("java.io.tmpdir", tmpPath);

Review Comment:
   The old variable name is better here.
   This is not used a base for paths, it's only used for saving the value of 
the system property.



##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/ParameterizedIndexUpgradeToolIT.java:
##########
@@ -115,7 +114,7 @@ public class ParameterizedIndexUpgradeToolIT extends 
BaseTest {
 
     @BeforeClass
     public static synchronized void saveTmp () throws Exception {
-        tmpDir = System.getProperty("java.io.tmpdir");
+        tmpPath = System.getProperty("java.io.tmpdir");

Review Comment:
   nit: I find it better to use tmpDir here, too.





> Replace /tmp with {java.io.tmpdir} in tests
> -------------------------------------------
>
>                 Key: PHOENIX-7081
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7081
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>            Reporter: Istvan Toth
>            Assignee: Divneet Kaur
>            Priority: Minor
>              Labels: beginner, test
>
> I was running two test suites in parallel on a large VM, and it seems that 
> OrphanViewToolIT cannot handle that.
> {noformat}
> java.io.FileNotFoundException: /tmp/OrphanView.txt (No such file or 
> directory){noformat}
> Use some directory here that is under the source code's root.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to