You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by gliptak <gi...@git.apache.org> on 2015/11/30 21:24:06 UTC

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

GitHub user gliptak opened a pull request:

    https://github.com/apache/phoenix/pull/137

    PHOENIX-2464 Convert phoenix-spark module to 'JUnitSuite' instead of …

    …'FunSuite'

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gliptak/phoenix PHOENIX-2464

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/phoenix/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 4878ea14c9c7a8056b36a489b8f0330e0ae9acd2
Author: Gábor Lipták <gl...@gmail.com>
Date:   2015-11-30T20:23:02Z

    PHOENIX-2464 Convert phoenix-spark module to 'JUnitSuite' instead of 'FunSuite'

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by jmahonin <gi...@git.apache.org>.
Github user jmahonin commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-160831941
  
    Definitely closer, it does run now, but it takes about 4x longer to run than before. The 'doSetup' and 'doTeardown' used to be run only at the very beginning and at the very end, and now they're being run before every test due to the '@Before' and '@After' annotations.
    
    I wonder if it's possible to do something like the 'ScalaClassRuleTest' in [1] and either specify a '@BeforeAll' or an '@ClassRule' in a companion object and move the 'doSetup' and 'doTeardown' there?
    
    [1] http://randomallsorts.blogspot.ca/2012/11/junit-411-whats-new-rules.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-161358663
  
    Another possibility is to duplicate ```BaseHBaseManagedTimeIT```/```BaseTest``` functionality in ```Scala```/```FunSuite``` ...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by jmahonin <gi...@git.apache.org>.
Github user jmahonin commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-160761094
  
    Hi @gliptak 
    
    I tried to run the tests with the patch applied, and got a number of failures. I think that 'beforeAll' and 'afterAll' aren't actually getting invoked in with the JUnitSuite for some reason.
    
    I tried adding the '@BeforeClass' and '@AfterClass' annotations, but JUnit warns that the methods should be static. Sadly, I think the only way to make that work is with a companion object (e.g. 'object PhoenixSparkIT' which contains the beforeAll and afterAll definitions).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-161151768
  
    Scala "static" methods on the companion object are not recognized as such by the ```@BeforeClass``` and ```@AfterClass``` annotations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-160784699
  
    @jmahonin Could you run the tests locally (my local setup is not quite working ...)? Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-161137156
  
    I measured 2x longer (with the Scalatest throwing warnings/errors during tear down ...). I will try to add the companion object.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak closed the pull request at:

    https://github.com/apache/phoenix/pull/137


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by gliptak <gi...@git.apache.org>.
Github user gliptak commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-160817033
  
    Now it runs locally.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: PHOENIX-2464 Convert phoenix-spark module to...

Posted by jmahonin <gi...@git.apache.org>.
Github user jmahonin commented on the pull request:

    https://github.com/apache/phoenix/pull/137#issuecomment-161512711
  
    Thanks @gliptak for looking into this.
    
    I'll spend a bit of time seeing if I can work something out here. I think the main goal is just to try be more compatible with JUnit annotations in inherited classes, but I do like having these run as fast as possible as well.
    
    I don't think it's necessarily a major problem if we do nothing here either - the issue only became apparent after merging in transaction support, a pretty large infrastructure addition, which only took a few lines to work around with the existing tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---