[jira] [Updated] (HDFS-12433) Upgrade JUnit from 4 to 5 in hadoop-hdfs security

2019-05-16 Thread Akira Ajisaka (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDFS-12433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Akira Ajisaka updated HDFS-12433:
-
Issue Type: Test  (was: Sub-task)
Parent: (was: HDFS-12254)

> Upgrade JUnit from 4 to 5 in hadoop-hdfs security
> -
>
> Key: HDFS-12433
> URL: https://issues.apache.org/jira/browse/HDFS-12433
> Project: Hadoop HDFS
>  Issue Type: Test
>  Components: test
>Reporter: Ajay Kumar
>Assignee: Kei Kori
>Priority: Major
> Attachments: HDFS-12433.001.patch, HDFS-12433.002.patch
>
>
> Upgrade JUnit from 4 to 5 in hadoop-hdfs security  
> (org.apache.hadoop.security)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Updated] (HDFS-12433) Upgrade JUnit from 4 to 5 in hadoop-hdfs security

2019-05-07 Thread Kei Kori (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDFS-12433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kei Kori updated HDFS-12433:

Attachment: HDFS-12433.002.patch

> Upgrade JUnit from 4 to 5 in hadoop-hdfs security
> -
>
> Key: HDFS-12433
> URL: https://issues.apache.org/jira/browse/HDFS-12433
> Project: Hadoop HDFS
>  Issue Type: Sub-task
>  Components: test
>Reporter: Ajay Kumar
>Assignee: Kei Kori
>Priority: Major
> Attachments: HDFS-12433.001.patch, HDFS-12433.002.patch
>
>
> Upgrade JUnit from 4 to 5 in hadoop-hdfs security  
> (org.apache.hadoop.security)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Updated] (HDFS-12433) Upgrade JUnit from 4 to 5 in hadoop-hdfs security

2019-05-07 Thread Kei Kori (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDFS-12433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kei Kori updated HDFS-12433:

Attachment: HDFS-12433.001.patch
Status: Patch Available  (was: Open)

replaced assertions, its argument orders, and 
Test/Before/After/BeforeClass/AfterClass annotations except Test(timeout=... / 
Test(expected=... cases.



I replaced with "git grep -l" and "sed" commands below:
{code:java}
git grep -wl 'import org.junit.Assert.' | xargs sed -i 's/import 
org\.junit\.Assert\./import static org\.junit\.jupiter\.api\.Assertions\./'
git grep -l 'import org.junit.Test;' | xargs sed -i 's/import 
org.junit.Test;/import org.junit.jupiter.api.Test;/'
git grep -l 'import org.junit.After;' | xargs sed -i 's/import 
org.junit.After;/import org.junit.jupiter.api.AfterEach;/'
git grep -l 'import org.junit.Before;' | xargs sed -i 's/import 
org.junit.Before;/import org.junit.jupiter.api.BeforeEach;/'
git grep -l '@Before$' | xargs sed -i 's/@Before$/@BeforeEach/'
git grep -l '@After$' | xargs sed -i 's/@After$/@AfterEach/'
git grep -l '@AfterClass$' | xargs sed -i 's/@AfterClass$/@AfterAll/'
git grep -l '@BeforeClass$' | xargs sed -i 's/@BeforeClass$/@BeforeAll/'
git grep -l 'import org.junit.BeforeClass;' | xargs sed -i 's/import 
org.junit.BeforeClass;/import org.junit.jupiter.api.BeforeAll;/'
git grep -l 'import org.junit.AfterClass;' | xargs sed -i 's/import 
org.junit.AfterClass;/import org.junit.jupiter.api.AfterAll;/'
git grep -l '@Test\s*(timeout' | xargs sed -i 's/import 
org.junit.jupiter.api.Test;/import org.junit.Test;/'
git grep -l '@Test\s*(expected' | xargs sed -i 's/import 
org.junit.jupiter.api.Test;/import org.junit.Test;/'
{code}
and modified argument orders with these patterns(these might not replace bad 
cases completely):
{code:java}
assertEquals\(([^,;]+),\s*([^,;]+),\s*([^,;]+)\);
assertEquals($2, $3, $1);
{code}
{code:java}
assert(True|False|Null|NotNull)\(("[^,;]+),\s*([^,;]+)\);
assert$1($3, $2);
{code}

then replaced wild card import with single class imports.



I would like to fix Test annotations with timeout/expected parameters in other 
tickets, because it seems the best alternative for global timeout in JUnit5 is 
not determined yet.

> Upgrade JUnit from 4 to 5 in hadoop-hdfs security
> -
>
> Key: HDFS-12433
> URL: https://issues.apache.org/jira/browse/HDFS-12433
> Project: Hadoop HDFS
>  Issue Type: Sub-task
>  Components: test
>Reporter: Ajay Kumar
>Assignee: Kei Kori
>Priority: Major
> Attachments: HDFS-12433.001.patch
>
>
> Upgrade JUnit from 4 to 5 in hadoop-hdfs security  
> (org.apache.hadoop.security)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org