Commit graph

651 commits

Author SHA1 Message Date
Renato Cavalcanti
7abc41cf4e
update copyright year to 2022 (#31057) 2022-02-04 12:36:44 +01:00
yongjiaw
12b84fb2c7
New stream operator aggregateWithBoundary #30797 2022-01-11 16:15:07 +01:00
Patrik Nordwall
2bc8460777
review patience config (#30709)
* take it from testkit settings instead of hard coded
* dilate it
* it's still somewhat confusing since we have both
  classic and typed testkits and they dilate the default
  timeout differently, but don't want to change too much
2021-10-01 16:48:16 +02:00
Patrik Nordwall
697f7a0e08
dilate TestKit shutdownActorSystem (#30685)
* rather many "Failed to stop [] within [10 seconds]" in CI
2021-10-01 15:41:17 +02:00
Andrei Arlou
bd7105d47d
Fix external links - third iteration (#30697) (#30722) 2021-09-28 09:22:58 +02:00
Arnout Engelen
5ecd26d369
Fix CoronerSpec instability (#30494)
Tested in https://github.com/akka/akka/pull/30437 that indeed looking at
the threads 'too soon' might miss the deadlock.
2021-08-06 14:24:28 +02:00
Andrea Peruffo
284926486a Exclude failing tests only on GHA 2021-08-04 14:38:18 +02:00
Andrei Arlou
258bac491b
Remove unused imports in tests (#30265) 2021-06-01 13:34:43 +02:00
Johan Andrén
c5655a9ce6
Upgrade to Scala 2.13.5 (#30072) 2021-03-30 20:57:23 +02:00
Nicolas Vollmar
278a36d036
Adds explicit ! method (#30004)
Needed for Scala 3
2021-02-10 13:20:29 +01:00
Andrea Peruffo
da70e0ccd4
Scala 3 cross compatible akka-actor / akka-testkit / akka-actor-tests (#29956)
* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
2021-02-01 16:38:29 +01:00
Arnout Engelen
31f654768f
Update copyright to 2021 2021-01-08 17:55:38 +01:00
Johannes Rudolph
8732b69446
testkit: more resilient check for available loopback addresses in SocketUtil on MacOS (#29607)
Fixes #29604
2020-09-15 11:22:27 +02:00
Johannes Rudolph
540c7205e1
testkit: do not try to use 127.x.y.255 as a test localhost address (#29566)
For some arcane reason, the JDK seems to block binding attempts to that
address.
2020-09-07 19:29:36 +02:00
Arnout Engelen
c41c0420ad
Update scala to 2.13.3 and silencer to 1.7.0 (#28991)
* Update scala to 2.13.3 and silencer to 1.7.0
* Also travis
* Fix various warnings
2020-08-10 12:54:38 +02:00
Andrii
beda844b8d
Allow using hypen in actorSystem name and do not replace it with underscore #28994 (#29399)
Co-authored-by: andrii.ryzhenko <andrii.ryzhenko@betlab.com>
2020-07-21 11:19:19 +02:00
ohze.net
01501148d7
dotty phase 3: Some required syntax changes (#29139)
Co-authored-by: Bùi Việt Thành <thanhbv@sandinh.net>
2020-06-25 09:47:31 +02:00
kerr
0e4d41ad33
+build Add sort imports support. (#28780)
* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
2020-04-27 14:32:18 +02:00
ohze.net
ea7205eaf7
dotty phase 2: scalafix ExplicitNonNullaryApply (#28949)
* scalafix ExplicitNonNullaryApply prepare

+ Temporarily use com.sandinh:sbt-scalafix because scalacenter/scalafix#1098
+ Add ExplicitNonNullaryApply rule to .scalafix.conf
+ Manually fix a NonNullaryApply case in DeathWatchSpec that cause
  `fixall` fail because ExplicitNonNullaryApply rule incorrectly rewrite
  `context unbecome` to `context unbecome()` instead of `context.unbecome()`

* scalafix ExplicitNonNullaryApply

fix by enabling only ExplicitNonNullaryApply rule in .scalafix.conf then:
```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
```

* scalafmtAll

* Revert to ch.epfl.scala:sbt-scalafix

Co-authored-by: Bùi Việt Thành <thanhbv@sandinh.net>
2020-04-27 12:31:16 +02:00
Patrik Nordwall
1dbc54b28a
fix wrong ActorSystem name when using MultiNodeClusterShardingSpec #28953 (#28954)
* fix wrong ActorSystem name when using MultiNodeClusterShardingSpec #28953

* use same testNameFromCallStack everywhere

* remove MultiJvm suffix from ActorSystem name
2020-04-23 15:54:38 +02:00
Bùi Việt Thành
666988ae57 scalafix Any2StringAdd
```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
```
2020-04-20 17:59:50 +07:00
Bùi Việt Thành
02b9b30354 scalafix ExplicitResultTypes - for implicit members 2020-04-20 17:59:50 +07:00
Bùi Việt Thành
4df76d6bce scalafix FinalObject 2020-04-20 17:59:49 +07:00
Kirill Yankov
41f20cbb81
Persistence testkit implementation #15571 (#26825) 2020-03-20 14:18:43 +01:00
Bartłomiej Szwej
717d72ff8f
Fix ExplicitlyTriggeredScheduler cancellation #28604 2020-03-11 16:30:37 +01:00
Johan Andrén
d26453b5e8
Clean up same thread execution contexts #26690
* deprecate internal sameThread ec and use a new one for all internal use sites
* Use the respective Scala version standard library "same thread" ec 
* fallback to the old inline impl on 2.12 when reflection isn't possible
2020-03-10 15:39:30 +01:00
Christopher Batey
2a5183f753 Use unique name for typed and untyped testprobes 2020-01-27 07:46:36 +00:00
Mike Limansky
d9ed927df0 Update to ScalaTest 3.1.0, fix #28289. 2020-01-11 15:15:10 +03:00
Helena Edelson
6bf20f4117 Update all copyright headers to 2020 after new year's #27881 (#28434) 2020-01-02 13:24:59 +01:00
Arnout Engelen
c337bf5287 Remove use of getClass in secondary constructors (#28355)
* Remove use of getClass in secondary constructors

As this is not allowed anymore on newer versions of scala, and likely
didn't work correctly in the past either

This might make selecting unique actor system names for test
actor systems a bit less reliable, but that didn't seem to be
critical anyway.

Thanks to @som-snytt for the heads-up and initial implementation
in #28353

* Avoid AkkaSpec.getCallerName in MultiNodeClusterShardingConfig

* StreamSpec can be abstract

* Use more sophisticated test class name logic

* scalafmt
2019-12-16 13:04:09 +01:00
Johannes Rudolph
702b6a7f41 actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem

* add overrides with concrete type for Java API everywhere
2019-12-05 16:01:22 +01:00
Patrik Nordwall
4e8a5d333b
More structured logger names, #27922 (#27934)
* some cluster logging improvements
* most logger names are actually good, when using ActorLogging since
  config can be setup on the package (prefix)
* override logSource when StageLogging is used
* replace system.log with more specific logger
2019-10-14 17:55:12 +02:00
Johannes Rudolph
650068aa45
Convert 2.5.x MiMa excludes to subdirectory style
Using this script:

```sh

set -ex

FILE=$1
DIR=`dirname $FILE`
TMP_FILE=$DIR/_existing.excludes
FINAL_FILE=$DIR/2.5.x.backwards.excludes/_existing.excludes

mv $FILE $TMP_FILE
mkdir $DIR/2.5.x.backwards.excludes
(echo "# This file contains all excludes added before changing to the subdirectory style" && cat $TMP_FILE) > $FINAL_FILE
rm $TMP_FILE
git add $FINAL_FILE
```
2019-10-01 13:59:56 +02:00
Arnout Engelen
e6859253e5 Update to MiMa 0.6.0 (#27558) 2019-09-11 11:28:12 +02:00
Helena Edelson
29f2eba049 Change "Untyped" to "Classic" (#27627)
* Untyped to classic naming convention #24717
* Added entry of naming convention change to migration docs.
* Rename `toUntyped` to `toClassic` in adapters
2019-09-05 12:30:52 +02:00
Johan Andrén
acee1b4185 Java TestKit expect msg all of broken (#27563)
* Java API compile coverage of the classic testkit
* API coverage of the typed Java testkit (looks good)
* New name for allOf with duration to allow usage from Java #27492
2019-08-29 10:42:15 +02:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
  from akka-remote to akka-actor since they had no dependency
  and are useful also in local systems, e.g. persistence.
  * e.g. needed for persistence-tck
  * less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
  but misconfigured
* Made tests pass
  * allow-java-serialization=on in akka-persistence
  * allow-java-serialization=on in classic remoting tests
  * JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
  * Boolean
  * java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
  * Effect() is factory in EventSourcedBehavior  class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
  * fallback to akka.remote.serialization.ThrowableNotSerializableException
    if exception is not serializable when wrapped in system messages from
    remote deployed child actors and Status.Failure messages
  * it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
  improving or removing that feature
* migration guide, including description of rolling update

* fix 2.13 compiler error

* minor review feedback
2019-07-11 14:04:24 +02:00
Patrik Nordwall
f9d76aa030
Log Dropped from DeadLetterListener, #26432 (#27160)
* Log Dropped from DeadLetterListener, #26432

* Move Dropped from akka-actor-typed to akka-actor
* Use it in Artery
* Use in right way from GroupRouter, not via deadLetters
* Remove "without sender" in log message from DeadLetterListener,
  since there is no sender in Typed
* mima filter
* add sender to Dropped
2019-07-04 14:52:42 +02:00
Patrik Nordwall
50e99e08d8 Use short configurable timeout for expectNoMessage #27212 (#27213)
* Use short configurable timeout for expectNoMessage #27212

* consistent with ActorTestKit in Typed

* fix config
2019-06-26 15:35:20 +01:00
Patrik Nordwall
10d32fceb9 scheduleWithFixedDelay vs scheduleAtFixedRate, #26910
* previous `schedule` method is trying to maintain a fixed average frequency
  over time, but that can result in undesired bursts of scheduled tasks after a long
  GC or if the JVM process has been suspended, same with all other periodic
  scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
  depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
  and `scheduleAtFixedRate`, when fixing the deprecation warning users should
  make a concious decision of which behavior to use (scheduleWithFixedDelay in
  most cases)

* Streams
* SchedulerSpec
  * test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
2019-06-05 11:38:04 +02:00
Helena Edelson
9f19e4972b
Better indicator of ActorRefProvider implementation selection (#27012) 2019-05-29 12:01:02 -07:00
Christopher Batey
6754bf7f73 Remove JavaTestkit (#27022)
* Remove JavaTestKit

* mima

* Also remove Caching partial function

* Formatting

* Update akka-docs/src/main/paradox/project/migration-guide-2.5.x-2.6.x.md

Co-Authored-By: Arnout Engelen <github@bzzt.net>
2019-05-29 15:45:20 +02:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Dale Wijnand
03c4efdc1d Rewrite some code for Scala 2.13 (#26944)
* Rewrite some code for Scala 2.13

Rewrote some code to avoid some deprecations coming in 2.13.

* Drop usage of scala.Symbol in the tests
2019-05-20 08:59:49 +02:00
Martynas Mickevičius
2184a617a3 Drop MiMa filters for 2.4.x (#26781) 2019-04-23 09:24:29 +02:00
Arnout Engelen
7372d2b735
Fix remaining akka-testkit warnings (#26752)
* Fix remaining akka-testkit warnings

Mostly in tests and 2.13

* Add issue link

* MiMa exclude for multi-node-testkit

We don't promise bincompat there anyway, but perhaps good to keep mima there
so at least we don't break things accidentally
2019-04-16 18:33:38 +02:00
Helena Edelson
392b4baf20 Compiler warnings for actor-testkit #26708 (#26716) 2019-04-15 07:11:24 +00:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00