This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 39682c8ca7 Delete DurableStateExceptionsSpec.scala (#3352)
39682c8ca7 is described below
commit 39682c8ca72e856a5653063239797ad3b913b4c7
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Jul 15 20:49:14 2026 +0100
Delete DurableStateExceptionsSpec.scala (#3352)
---
.../exception/DurableStateExceptionsSpec.scala | 57 ----------------------
1 file changed, 57 deletions(-)
diff --git
a/persistence/src/test/scala/org/apache/pekko/persistence/state/exception/DurableStateExceptionsSpec.scala
b/persistence/src/test/scala/org/apache/pekko/persistence/state/exception/DurableStateExceptionsSpec.scala
deleted file mode 100644
index 66fadb3bcf..0000000000
---
a/persistence/src/test/scala/org/apache/pekko/persistence/state/exception/DurableStateExceptionsSpec.scala
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.pekko.persistence.state.exception
-
-import java.lang.invoke.{ MethodHandles, MethodType }
-
-import scala.util.Try
-import scala.util.control.NoStackTrace
-
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpecLike
-
-/**
- * Tests for [[DurableStateException]]s.
- * <p>
- * To avoid making Pekko persistence implementations dependent on
- * Pekko v1.1, these exceptions will be created using MethodHandles.
- * </p>
- */
-class DurableStateExceptionsSpec extends AnyWordSpecLike
- with Matchers {
-
- private val methodHandleLookup = MethodHandles.publicLookup()
-
- "DurableStateException support" must {
- "allow creating DeleteRevisionException using MethodHandle" in {
- val exceptionClassOpt: Option[Class[?]] =
-
Try(Class.forName("org.apache.pekko.persistence.state.exception.DeleteRevisionException")).toOption
- exceptionClassOpt should not be empty
- val constructorOpt = exceptionClassOpt.map { clz =>
- val mt = MethodType.methodType(classOf[Unit], classOf[String])
- methodHandleLookup.findConstructor(clz, mt)
- }
- constructorOpt should not be empty
- val constructor = constructorOpt.get
- val ex = constructor.invoke("delete failed").asInstanceOf[Exception]
- ex shouldBe an[DeleteRevisionException]
- ex shouldBe an[NoStackTrace]
- ex.getMessage shouldEqual "delete failed"
- }
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]