Skip to content

MAPREDUCE-7391. TestLocalDistributedCacheManager failing after HADOOP-16202#4472

Merged
steveloughran merged 3 commits intoapache:trunkfrom
steveloughran:s3/MAPREDUCE-7391-LocalDistributedCacheManager-failure
Jun 22, 2022
Merged

MAPREDUCE-7391. TestLocalDistributedCacheManager failing after HADOOP-16202#4472
steveloughran merged 3 commits intoapache:trunkfrom
steveloughran:s3/MAPREDUCE-7391-LocalDistributedCacheManager-failure

Conversation

@steveloughran
Copy link
Contributor

Mocking broke with the move to the builder.

Took the opportunity to clean up the test class with

  • use of lambda expressions for answers where they were short enough
  • constant for file contents
  • return that data's length in the getFileStatus calls
  • javadocs for the tests ca!ses which didn't have them.

…-16202

Mocking broke with the move the builder.

Took the opportunity to clean up the test class with
* use of lambda expressions for answers where they were short enough
* constant for file contents
* return that data's length in the getFileStatus calls
* javadocs for the tests cases which didn't have them.

Change-Id: Iaa64c97bb011322d3dbc494b163325ed530fdf6e
…-16202

Fixed the checkstyle errors. These weren't new, but as the old code was
moved they triggered the failure.
Refactored the code in question so there's less duplication; same for the
creation of the mock file status.

Change-Id: I79672fca3d67ac9aac2566e05f6073f7078b65d7
@steveloughran
Copy link
Contributor Author

@ayushtkn @mukund-thakur could you two review this. test failure on trunk/branch-3.3

Copy link
Contributor

@mukund-thakur mukund-thakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1, pending one minor comment.

@SuppressWarnings("deprecation")
public class TestLocalDistributedCacheManager {

public static final byte[] TEST_DATA = "This is a test file\n".getBytes();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, IDE did that without me noticing

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM.
Merge once you sort out the public->private stuff

* Recursive delete of a path.
* For safety, paths of length under 5 are rejected.
* @param file path to delete.
* @throws IOException IO failure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw This delete method never throws IOE, it is just there as a dummy in the method signature

Change-Id: I2b9d57bd9f0c44122491a3d82c32cc9ae24e33db
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 38s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 36m 53s trunk passed
+1 💚 compile 0m 55s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 0m 51s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 0m 44s trunk passed
+1 💚 mvnsite 0m 49s trunk passed
+1 💚 javadoc 0m 59s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 47s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 1m 34s trunk passed
+1 💚 shadedclient 20m 48s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 0m 36s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 0m 36s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 0m 33s the patch passed
+1 💚 blanks 0m 1s The patch has no blanks issues.
+1 💚 checkstyle 0m 24s hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common: The patch generated 0 new + 3 unchanged - 1 fixed = 3 total (was 4)
+1 💚 mvnsite 0m 36s the patch passed
+1 💚 javadoc 0m 32s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 27s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 1m 13s the patch passed
+1 💚 shadedclient 20m 23s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 17s hadoop-mapreduce-client-common in the patch passed.
+1 💚 asflicense 0m 51s The patch does not generate ASF License warnings.
93m 48s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4472/3/artifact/out/Dockerfile
GITHUB PR #4472
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 9fdbb143cbb2 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b30ebb7
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4472/3/testReport/
Max. process+thread count 555 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4472/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@apache apache deleted a comment from hadoop-yetus Jun 22, 2022
@apache apache deleted a comment from hadoop-yetus Jun 22, 2022
@steveloughran steveloughran merged commit c9ddbd2 into apache:trunk Jun 22, 2022
asfgit pushed a commit that referenced this pull request Jun 22, 2022
…-16202 (#4472)

Fixing a mockito-based test which broke when HADOOP-16202
changed the methods being invoked.

Contributed by Steve Loughran
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
…-16202 (apache#4472)


Fixing a mockito-based test which broke when HADOOP-16202
changed the methods being invoked.

Contributed by Steve Loughran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants