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

Mark some tests as pending for Oracle with legacy dao #674

Merged
merged 2 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf
}

it should "find all events by tag" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? withTags(1, "number")).futureValue
Expand Down Expand Up @@ -92,6 +94,8 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf
}

it should "persist and find a tagged event with multiple tags" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
withClue("Persisting multiple tagged events") {
Expand Down Expand Up @@ -165,6 +169,8 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf

it should "complete without any gaps in case events are being persisted when the query is executed" in withActorSystem {
implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new JavaDslJdbcReadJournalOperations(system)
import system.dispatcher
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ abstract class EventAdapterTest(config: String) extends QueryTestSpec(config) {
}

it should "apply event adapters when querying events by tag from an offset" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? TaggedEvent(Event("1"), "event")).futureValue
Expand Down Expand Up @@ -137,6 +139,8 @@ abstract class EventAdapterTest(config: String) extends QueryTestSpec(config) {
}

it should "apply event adapters when querying all current events by tag" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? TaggedEvent(Event("1"), "event")).futureValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "find all events by tag" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? withTags(1, "number")).futureValue
Expand Down Expand Up @@ -120,6 +122,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "deliver EventEnvelopes non-zero timestamps" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val testStartTime = System.currentTimeMillis()
val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
Expand Down Expand Up @@ -155,6 +159,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "select events by tag with exact match" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)

withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
Expand Down Expand Up @@ -195,6 +201,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con

it should "find all events by tag even when lots of events are persisted concurrently" in withActorSystem {
implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
val msgCountPerActor = 20
val numberOfActors = 100
Expand Down Expand Up @@ -224,6 +232,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "find events by tag from an offset" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new JavaDslJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? withTags(1, "number")).futureValue
Expand All @@ -249,6 +259,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "persist and find tagged event for one tag" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new JavaDslJdbcReadJournalOperations(system)
withTestActors() { (actor1, actor2, actor3) =>
journalOps.withEventsByTag(10.seconds)("one", NoOffset) { tp =>
Expand Down Expand Up @@ -294,6 +306,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
}

it should "persist and find tagged events when stored with multiple tags" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
(actor1 ? withTags(1, "one", "1", "prime")).futureValue
Expand Down Expand Up @@ -371,6 +385,8 @@ abstract class EventsByTagTest(config: String) extends QueryTestSpec(config, con
def timeoutMultiplier: Int = 1

it should "show the configured performance characteristics" in withActorSystem { implicit system =>
pendingIfOracleWithLegacy()

import system.dispatcher
val journalOps = new ScalaJdbcReadJournalOperations(system)
withTestActors(replyToMessages = true) { (actor1, actor2, actor3) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ abstract class QueryTestSpec(config: String, configOverrides: Map[String, Config
}
}

def pendingIfOracleWithLegacy(): Unit = {
if (
profile == slick.jdbc.OracleProfile && readJournalConfig.pluginConfig.dao == classOf[
akka.persistence.jdbc.query.dao.legacy.ByteArrayReadJournalDao].getName
)
pending // TODO https://github.com/akka/akka-persistence-jdbc/issues/673
}

def setupEmpty(persistenceId: Int, replyToMessages: Boolean)(implicit system: ActorSystem): ActorRef = {
system.actorOf(Props(new TestActor(persistenceId, replyToMessages)))
}
Expand Down