You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "errose28 (via GitHub)" <gi...@apache.org> on 2023/06/20 06:22:07 UTC
[GitHub] [ozone] errose28 opened a new pull request, #4936: HDDS-8553. Improve scanner integration tests.
errose28 opened a new pull request, #4936:
URL: https://github.com/apache/ozone/pull/4936
## What changes were proposed in this pull request?
Adds more robust integration testing of the background and on demand metadata and data container scanners. Improvements include:
- Each scanner has its own test.
- Ability to inject any container failure into the test.
- Each scanner test can define the types of failures it is able to detect.
- New dev configs allow turning scanners on/off individually to test in isolation while the datanode is running.
## What is the link to the Apache JIRA
HDDS-8553
## How was this patch tested?
- New tests passed locally. Once I have repeated runs passing on my fork to ensure they are not flaky I will take this out of draft mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai merged pull request #4936: HDDS-8553. Improve scanner integration tests.
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #4936:
URL: https://github.com/apache/ozone/pull/4936
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] hemantk-12 commented on a diff in pull request #4936: HDDS-8553. Improve scanner integration tests.
Posted by "hemantk-12 (via GitHub)" <gi...@apache.org>.
hemantk-12 commented on code in PR #4936:
URL: https://github.com/apache/ozone/pull/4936#discussion_r1237874874
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/dn/scanner/TestBackgroundContainerDataScannerIntegration.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.hadoop.ozone.dn.scanner;
+
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos;
+import org.apache.hadoop.ozone.container.ozoneimpl.BackgroundContainerDataScanner;
+import org.apache.hadoop.ozone.container.ozoneimpl.ContainerScannerConfiguration;
+import org.apache.ozone.test.GenericTestUtils;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Integration tests for the background container data scanner. This scanner
+ * checks all data and metadata in the container.
+ */
+@RunWith(Parameterized.class)
Review Comment:
nit: since it is new code, it would be great if you use JUnit-5 and its parameterized tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #4936: HDDS-8553. Improve scanner integration tests.
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4936:
URL: https://github.com/apache/ozone/pull/4936#issuecomment-1603999694
Thanks @errose28 for the patch, @hemantk-12, @sumitagrawl for the review.
> nit: since it is new code, it would be great if you use JUnit-5 and its parameterized tests.
100% agree, we should make this a recommendation. In this case I think we can file a follow-up task: the tests are useful in their current form and there is no harm in having them as JUnit4 for some time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org