You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Ashutosh Mestry <am...@hortonworks.com> on 2017/04/03 22:45:58 UTC

Review Request 58159: Unit test: Import & Export APIs

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/
-----------------------------------------------------------

Review request for atlas and Madhan Neethiraj.


Bugs: ATLAS-1709
    https://issues.apache.org/jira/browse/ATLAS-1709


Repository: atlas


Description
-------

**Background**
Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.

**Implementation**
Unit tests have been implemented to cover the top-level classes and the supporting classes.

The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.


Diffs
-----

  intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java ea2a7038 
  notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java 77c17114 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
  repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
  repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
  repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
  repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
  repository/src/test/resources/stocks.zip PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
  webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
  webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
  webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
  webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
  webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 


Diff: https://reviews.apache.org/r/58159/diff/1/


Testing
-------

Verified REST APIs via CURL calls. They function as expected.
Verified the test suite via IntelliJ IDE and as part of module maven build.

_ImportServiceTest_
* Runs consistently from IntelliJ IDE.
* From _maven_ command line causes intermittent failures.


Thanks,

Ashutosh Mestry


Re: Review Request 58159: Unit test: Import & Export APIs

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/#review170978
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
Line 1030 (original), 1030 (patched)
<https://reviews.apache.org/r/58159/#comment243811>

    Typo



notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java
Line 145 (original), 145 (patched)
<https://reviews.apache.org/r/58159/#comment243812>

    I think this was a local change. Please revert



repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java
Lines 33 (patched)
<https://reviews.apache.org/r/58159/#comment243814>

    Context is not being used anywhere. Remove if not needed.



repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java
Lines 98 (patched)
<https://reviews.apache.org/r/58159/#comment243816>

    Use Assert.fail("<some message>")



repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java
Lines 102 (patched)
<https://reviews.apache.org/r/58159/#comment243817>

    Use Assert.fail("<some message>")



repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java
Lines 73 (patched)
<https://reviews.apache.org/r/58159/#comment243818>

    Rename to verifyGuidRemovalOnImportComplete


- Apoorv Naik


On April 3, 2017, 10:45 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58159/
> -----------------------------------------------------------
> 
> (Updated April 3, 2017, 10:45 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1709
>     https://issues.apache.org/jira/browse/ATLAS-1709
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.
> 
> **Implementation**
> Unit tests have been implemented to cover the top-level classes and the supporting classes.
> 
> The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java ea2a7038 
>   notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java 77c17114 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
>   repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
>   repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/stocks.zip PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
>   webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 
> 
> 
> Diff: https://reviews.apache.org/r/58159/diff/1/
> 
> 
> Testing
> -------
> 
> Verified REST APIs via CURL calls. They function as expected.
> Verified the test suite via IntelliJ IDE and as part of module maven build.
> 
> _ImportServiceTest_
> * Runs consistently from IntelliJ IDE.
> * From _maven_ command line causes intermittent failures.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 58159: Unit test: Import & Export APIs

Posted by Ashutosh Mestry <am...@hortonworks.com>.

> On April 4, 2017, 4:19 p.m., Apoorv Naik wrote:
> > Test Result (3 failures / +3)
> > 
> >     org.apache.atlas.kafka.KafkaNotificationTest.testNext
> >     org.apache.atlas.repository.impexp.ImportServiceTest.importReporting_Succeeds
> >     org.apache.atlas.repository.impexp.ImportServiceTest.importSales_Succeeds

As of now, I don't have a solution to address these failures. The _KafkaNotificationTest_ is beyond scope of my work.


- Ashutosh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/#review170976
-----------------------------------------------------------


On April 3, 2017, 10:45 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58159/
> -----------------------------------------------------------
> 
> (Updated April 3, 2017, 10:45 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1709
>     https://issues.apache.org/jira/browse/ATLAS-1709
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.
> 
> **Implementation**
> Unit tests have been implemented to cover the top-level classes and the supporting classes.
> 
> The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.
> 
> 
> Diffs
> -----
> 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
>   repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
>   repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/stocks.zip PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
>   webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 
> 
> 
> Diff: https://reviews.apache.org/r/58159/diff/2/
> 
> 
> Testing
> -------
> 
> Verified REST APIs via CURL calls. They function as expected.
> Verified the test suite via IntelliJ IDE and as part of module maven build.
> 
> _ImportServiceTest_
> * Runs consistently from IntelliJ IDE.
> * From _maven_ command line causes intermittent failures.
> 
> I have set ignore for the 2 tests that fail intermittently.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 58159: Unit test: Import & Export APIs

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/#review170976
-----------------------------------------------------------



Test Result (3 failures / +3)

    org.apache.atlas.kafka.KafkaNotificationTest.testNext
    org.apache.atlas.repository.impexp.ImportServiceTest.importReporting_Succeeds
    org.apache.atlas.repository.impexp.ImportServiceTest.importSales_Succeeds

- Apoorv Naik


On April 3, 2017, 10:45 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58159/
> -----------------------------------------------------------
> 
> (Updated April 3, 2017, 10:45 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1709
>     https://issues.apache.org/jira/browse/ATLAS-1709
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.
> 
> **Implementation**
> Unit tests have been implemented to cover the top-level classes and the supporting classes.
> 
> The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java ea2a7038 
>   notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java 77c17114 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
>   repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
>   repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/stocks.zip PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
>   webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 
> 
> 
> Diff: https://reviews.apache.org/r/58159/diff/1/
> 
> 
> Testing
> -------
> 
> Verified REST APIs via CURL calls. They function as expected.
> Verified the test suite via IntelliJ IDE and as part of module maven build.
> 
> _ImportServiceTest_
> * Runs consistently from IntelliJ IDE.
> * From _maven_ command line causes intermittent failures.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 58159: Unit test: Import & Export APIs

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/#review171804
-----------------------------------------------------------


Ship it!




Ship It!

- Sarath Subramanian


On April 3, 2017, 3:45 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58159/
> -----------------------------------------------------------
> 
> (Updated April 3, 2017, 3:45 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1709
>     https://issues.apache.org/jira/browse/ATLAS-1709
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.
> 
> **Implementation**
> Unit tests have been implemented to cover the top-level classes and the supporting classes.
> 
> The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.
> 
> _ImportServiceTests_: Had to split it in 3 separate classes to overcome intermittent failure problem.
> 
> 
> Diffs
> -----
> 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceReportingTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
>   repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
>   repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/stocks.zip PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
>   webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 
> 
> 
> Diff: https://reviews.apache.org/r/58159/diff/5/
> 
> 
> Testing
> -------
> 
> Verified REST APIs via CURL calls. They function as expected.
> Verified the test suite via IntelliJ IDE and as part of module maven build.
> 
> _ImportServiceTest_:
> - Runs consistently from IntelliJ IDE.
> - From _repository_ directory, verify using: 
> ```
> mvn compile install -Dtest=ImportServiceTest -Ptitan0
> ```
> 
> Verify all _Repository_ tests:
> - cd _repository_
> - Run:
> ```
> mvn compile install -Ptitan0
> ```
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 58159: Unit test: Import & Export APIs

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58159/#review171009
-----------------------------------------------------------



The below test also fails:
  AtlasTypeDefGraphStoreTest.testGet:70 expected:<0> but was:<1>


repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
Lines 74 (patched)
<https://reviews.apache.org/r/58159/#comment243841>

    change throws to AtlasBaseException



repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
Lines 92 (patched)
<https://reviews.apache.org/r/58159/#comment243842>

    change throws to AtlasBaseException



repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
Lines 155 (patched)
<https://reviews.apache.org/r/58159/#comment243845>

    consider giving valid hostname - 'localhost'


- Sarath Subramanian


On April 3, 2017, 3:45 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58159/
> -----------------------------------------------------------
> 
> (Updated April 3, 2017, 3:45 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1709
>     https://issues.apache.org/jira/browse/ATLAS-1709
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Existing implementation is not supported by suite of unit tests. This impacts sustainbility of the module.
> 
> **Implementation**
> Unit tests have been implemented to cover the top-level classes and the supporting classes.
> 
> The implementaion caused the classes to be moved from existing _webapp_ module to _repository_.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java ea2a7038 
>   notification/src/main/java/org/apache/atlas/kafka/KafkaNotification.java 77c17114 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java PRE-CREATION 
>   repository/src/test/resources/dept-employee-test-utils.zip PRE-CREATION 
>   repository/src/test/resources/logging-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/reporting-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/sales-v1-full.zip PRE-CREATION 
>   repository/src/test/resources/stocks.zip PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 097589f2 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java 159369cd 
>   webapp/src/main/java/org/apache/atlas/web/resources/ImportService.java eb81e3ce 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipExportFileNames.java c41ff56a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java c197d41a 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSource.java 8b2b9dfe 
> 
> 
> Diff: https://reviews.apache.org/r/58159/diff/1/
> 
> 
> Testing
> -------
> 
> Verified REST APIs via CURL calls. They function as expected.
> Verified the test suite via IntelliJ IDE and as part of module maven build.
> 
> _ImportServiceTest_
> * Runs consistently from IntelliJ IDE.
> * From _maven_ command line causes intermittent failures.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>