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

Hemanth Yamijala updated ATLAS-841:
-----------------------------------
    Attachment: ATLAS-841.patch

The attached patch fixes the unit tests by mocking the calls to 
{{is_hbase_local}} and {{is_solr_local}}. Also, I've added another test to 
verify the corresponding hbase and solr setup methods are not called in default 
case. I am not very familiar with Python's mock testing framework, so took some 
guesses based on current code. Please do let me know if this is the right way 
to do things.

I am not attaching this patch on review board, as it is small enough to verify 
directly, I guess.

> mvn clean install of Atlas is failing python unit tests
> -------------------------------------------------------
>
>                 Key: ATLAS-841
>                 URL: https://issues.apache.org/jira/browse/ATLAS-841
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Hemanth Yamijala
>            Assignee: Hemanth Yamijala
>            Priority: Blocker
>             Fix For: 0.7-incubating
>
>         Attachments: ATLAS-841.patch
>
>
> Run mvn clean install on master, git id: 
> 65d95ebe23744f72c0ed40b9a171d3c42cd2906c. It fails as below:
> {code}
> [INFO] --- exec-maven-plugin:1.2.1:exec (python-test) @ atlas-distro ---
> test_jar_java_lookups_fail (TestMetadata.TestMetadata) ... ok
> test_jar_java_lookups_succeed_from_path (TestMetadata.TestMetadata) ... ok
> test_main (TestMetadata.TestMetadata) ... Apache Atlas Server started!!!
> FAIL
> ======================================================================
> FAIL: test_main (TestMetadata.TestMetadata)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/Users/hyamijala/projects/hwx/atlas/src/atlas/distro/src/test/mock/mock.py", 
> line 1199, in patched
>     return func(*args, **keywargs)
>   File 
> "/Users/hyamijala/projects/hwx/atlas/src/atlas/distro/src/test/python/scripts/TestMetadata.py",
>  line 58, in test_main
>     self.assertTrue(configure_hbase_mock.called)
> AssertionError: False is not true
> ----------------------------------------------------------------------
> Ran 3 tests in 0.004s
> FAILED (failures=1)
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to