Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScalaReplIntegrationTest.test_run_repl_direct could print/log bad output on failure #778

Closed
lahosken opened this issue Nov 7, 2014 · 1 comment

Comments

@lahosken
Copy link
Contributor

lahosken commented Nov 7, 2014

A Travis run failed on this test. The failure was transient: pressing the re-run button made things go green. A possible step towards robust-ifying this test: add a print(output_lines). I ?think? this will be silent if the test passes, but would show up in the CI log if the test fails. And if we know what the "bad" output is, maybe we can fix it next time. Here's the not-so-actionable CI snippet now:

                   _ ScalaReplIntegrationTest.test_run_repl_direct __

                     self = <pants_test.tasks.test_scala_repl_integration.ScalaReplIntegrationTest testMethod=test_run_repl_direct>

                         def test_run_repl_direct(self):
                           output_lines = self.run_repl('examples/src/scala/com/pants/example/hello/welcome', dedent("""\
                               import com.pants.example.hello.welcome.WelcomeEverybody
                               println(WelcomeEverybody("World" :: Nil).head)
                               """))
                     >     self.assertEquals(len(output_lines), 11)
                     E     AssertionError: 2 != 11

                     tests/python/pants_test/tasks/test_scala_repl_integration.py:29: AssertionError
                      1 failed, 12 passed, 1 skipped in 434.09 seconds 

FAILURE
wickman added a commit that referenced this issue Dec 4, 2014
SSIA.  The user facing parts of this change:
  - package resolution happens via requests now -- this is way more reliable
    and results in fewer Untranslateable exceptions
  - PEX_VERBOSE now controls all pex verbosity, including better messages around Untranslateable (yay!)
  - fixes a major pex regression with namespace packages introduced somewhere in 0.5.x

The pex 0.7.0 -> 0.8.0 changelog:

* *API change*: Decouple translation from package iteration.  This removes
  the Obtainer construct entirely, which likely means if you're using PEX as
  a library, you will need to change your code if you were doing anything
  nontrivial.  This adds a couple new options to ``resolve`` but simplifies
  the story around how to cache packages.
  [RB #785](https://rbcommons.com/s/twitter/r/785/)
* Refactor http handling in pex to allow for alternate http implementations.  Adds support
  for [requests](https://github.com/kennethreitz/requests),
  improving both performance and security.   For more information, read the commit notes at
  [91c7f32](pex-tool/pex@91c7f32).
  [RB #778](https://rbcommons.com/s/twitter/r/778/)
* Improvements to API documentation throughout.
* Renamed ``Tracer`` to ``TraceLogger`` to prevent nondeterministic isort ordering.
* Refactor tox.ini to increase the number of environment combinations and improve coverage.
* Adds HTTP retry support for the RequestsContext.
  [RB #1303](https://rbcommons.com/s/twitter/r/1303/)
* Make pex --version correct.
  [Issue #19](pex-tool/pex#19)
* Bug fix: Fix over-aggressive sys.modules scrubbing for namespace packages.  Under
  certain circumstances, namespace packages in site-packages could conflict with packages
  within a PEX, causing them to fail importing.
  [RB #1378](https://rbcommons.com/s/twitter/r/1378/)
* Bug fix: Replace uses of ``os.unsetenv(...)`` with ``del os.environ[...]``
  [Pull Request #11](pex-tool/pex#11)
* Bug fix: Scrub sys.path and sys.modules based upon both supplied path and
  realpath of files and directories.  Newer versions of virtualenv on Linux symlink site-packages
  which caused those packages to not be removed from sys.path correctly.
  [Issue #21](pex-tool/pex#21)
* Bug fix: The pex -s option was not correctly pulling in transitive dependencies.
  [Issue #22](pex-tool/pex#22)
* Bug fix: Adds ``content`` method to HTTP contexts that does HTML content decoding, fixing
  an encoding issue only experienced when using Python 3.
  [Issue #10](pex-tool/pex#10)

Testing Done:
build-support/bin/ci.sh

Reviewed at https://rbcommons.com/s/twitter/r/1421/
@lahosken
Copy link
Contributor Author

(Wickman didn't really reference this issue from that commit. He referenced RBCommons review 778.)

@benjyw benjyw closed this as completed Jul 16, 2020
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

No branches or pull requests

2 participants