-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix corner case found in Akka Persistence Testkit (#229)
* Fix travis, actually test different scala versions * Fix corner case found in Akka Persistence Testkit * Add patches to test on all Scala versions
- Loading branch information
Showing
21 changed files
with
301 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/test/resources/expected_output/basic/akka/persistence/testkit/EventStorage$.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package akka.persistence.testkit; | ||
public class EventStorage$ { | ||
/** | ||
* Static reference to the singleton instance of this Scala object. | ||
*/ | ||
public static final EventStorage$ MODULE$ = null; | ||
public EventStorage$ () { throw new RuntimeException(); } | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/resources/expected_output/basic/akka/persistence/testkit/EventStorage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package akka.persistence.testkit; | ||
public interface EventStorage { | ||
static public class JournalPolicies$ implements akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation> { | ||
/** | ||
* Static reference to the singleton instance of this Scala object. | ||
*/ | ||
public static final JournalPolicies$ MODULE$ = null; | ||
public JournalPolicies$ () { throw new RuntimeException(); } | ||
} | ||
public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ; | ||
} |
3 changes: 3 additions & 0 deletions
3
src/test/resources/expected_output/basic/akka/persistence/testkit/JournalOperation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package akka.persistence.testkit; | ||
public interface JournalOperation { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/expected_output/basic/akka/persistence/testkit/ProcessingPolicy$.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package akka.persistence.testkit; | ||
public class ProcessingPolicy$ { | ||
/** | ||
* Static reference to the singleton instance of this Scala object. | ||
*/ | ||
public static final ProcessingPolicy$ MODULE$ = null; | ||
public ProcessingPolicy$ () { throw new RuntimeException(); } | ||
} |
30 changes: 30 additions & 0 deletions
30
src/test/resources/expected_output/basic/akka/persistence/testkit/ProcessingPolicy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package akka.persistence.testkit; | ||
public interface ProcessingPolicy<U extends java.lang.Object> { | ||
static public interface DefaultPolicies<U extends java.lang.Object> { | ||
public class PassAll { | ||
static public java.lang.String productPrefix () { throw new RuntimeException(); } | ||
static public int productArity () { throw new RuntimeException(); } | ||
static public Object productElement (int x$1) { throw new RuntimeException(); } | ||
static public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); } | ||
static public boolean canEqual (Object x$1) { throw new RuntimeException(); } | ||
static public int hashCode () { throw new RuntimeException(); } | ||
static public java.lang.String toString () { throw new RuntimeException(); } | ||
static public abstract boolean equals (Object that) ; | ||
} | ||
public class PassAll$ implements akka.persistence.testkit.ProcessingPolicy<U>, scala.Product, scala.Serializable { | ||
/** | ||
* Static reference to the singleton instance of this Scala object. | ||
*/ | ||
public static final PassAll$ MODULE$ = null; | ||
public PassAll$ () { throw new RuntimeException(); } | ||
public java.lang.String productPrefix () { throw new RuntimeException(); } | ||
public int productArity () { throw new RuntimeException(); } | ||
public Object productElement (int x$1) { throw new RuntimeException(); } | ||
public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); } | ||
public boolean canEqual (Object x$1) { throw new RuntimeException(); } | ||
public int hashCode () { throw new RuntimeException(); } | ||
public java.lang.String toString () { throw new RuntimeException(); } | ||
} | ||
public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<U>.PassAll$ PassAll () ; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/resources/input/basic/akka/persistence/testkit/EventStorage.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package akka.persistence.testkit | ||
|
||
import akka.persistence.testkit.ProcessingPolicy.DefaultPolicies | ||
|
||
private[testkit] trait EventStorage { | ||
import EventStorage._ | ||
|
||
val DefaultPolicy = JournalPolicies.PassAll | ||
} | ||
|
||
object EventStorage { | ||
object JournalPolicies extends DefaultPolicies[JournalOperation] | ||
} | ||
|
||
sealed trait JournalOperation |
11 changes: 11 additions & 0 deletions
11
src/test/resources/input/basic/akka/persistence/testkit/ProcessingPolicy.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package akka.persistence.testkit | ||
|
||
trait ProcessingPolicy[U] | ||
|
||
object ProcessingPolicy { | ||
private[testkit] trait DefaultPolicies[U] { | ||
type PolicyType = ProcessingPolicy[U] | ||
|
||
case object PassAll extends PolicyType | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.