twitter / util

Wonderful reusable code from Twitter
https://twitter.github.io/util
Apache License 2.0
2.69k stars 581 forks source link

use scalatest non-deprecated names #280

Closed martijnhoekstra closed 4 years ago

martijnhoekstra commented 4 years ago

Problem

Use of many deprecated names since upgrading to scalatest 3.1

Solution

Run using autofix from https://github.com/scalatest/autofix/tree/master/3.1.x

Result

All deprecated names replaced with their new names

yufangong commented 4 years ago

Thanks a lot @martijnhoekstra! Travis CI is complaining about WordSpec, can you please take a look?

[info] Compiling 3 Scala sources to /home/travis/build/twitter/util/util-test/target/scala-2.11/classes ...
[error] /home/travis/build/twitter/util/util-test/src/main/scala/com/twitter/logging/TestLogging.scala:27:50: not found: type WordSpec
[error] trait TestLogging extends BeforeAndAfter { self: WordSpec =>
[error]                                                  ^
[error] /home/travis/build/twitter/util/util-test/src/main/scala/com/twitter/logging/TestLogging.scala:77:11: type mismatch;
[error]  found   : Unit
[error]  required: org.scalatest.Assertion
[error]     (which expands to)  org.scalatest.compatible.Assertion
[error]     assert(logLines().filter { _ contains substring }.size > 0)
[error]           ^
[info] Done compiling.
[info] Compiling 13 Scala sources to /home/travis/build/twitter/util/util-zk/target/scala-2.11/classes ...
[error] two errors found
codecov-commenter commented 4 years ago

Codecov Report

Merging #280 into develop will increase coverage by 0.01%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #280      +/-   ##
===========================================
+ Coverage    46.27%   46.29%   +0.01%     
===========================================
  Files          243      243              
  Lines        14462    14462              
  Branches       894      895       +1     
===========================================
+ Hits          6693     6695       +2     
+ Misses        7769     7767       -2     
Impacted Files Coverage Δ
...c/main/scala/com/twitter/logging/TestLogging.scala 0.00% <ø> (ø)
util-core/src/main/scala/com/twitter/io/Buf.scala 92.57% <0.00%> (+0.41%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8fcc7e0...62ef630. Read the comment docs.

martijnhoekstra commented 4 years ago

I don't know how I missed that @yufangong

Anyway, fixed and rebased so that Travis is green again.

bryce-anderson commented 4 years ago

Merged as ad616bad950ecd7223604e0abf5e6deb78468001. Thank you!