Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Akka: What jar file contains jdocs.AbstractJavaTest?

Tags:

akka

What jar-file dependency do I add to resolve this import?

import jdocs.AbstractJavaTest;

It's imported in Akka's own example code (https://doc.akka.io/docs/akka/current/java/testing.html) yet after a lot of searching I can't find any mention of the actual jar dependency and the Akka documentation search function is so unhelpful that it claims there are no mentions of "jdocs.AbstractJavaTest" even when the code is on the screen in front of me.

Note that the following artifacts do not contain it:

'com.typesafe.akka:akka-actor_2.12:2.5.6'
'com.typesafe.akka:akka-testkit_2.12:2.5.3'

Thanks for any help you can give.

like image 237
Gareth Randall Avatar asked Nov 14 '17 15:11

Gareth Randall


1 Answers

AbstractJavaTest is located in the akka-docs module in the Akka repository and is not packaged in any of the published jars. All it does is extend JUnitSuite:

/*
 * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com>
 */
package jdocs

import org.scalatest.junit.JUnitSuite

/**
 * Base class for all runnable example tests written in Java
 */
abstract class AbstractJavaTest extends JUnitSuite {

}

As documented in the pull request that brought in this class, it was added to (1) hide the detail that the Java test suites in the Akka documentation need to extend JUnitSuite, and (2) to define that in one location. Feel free to manually add this class or its equivalent to your code, or simply have your test suites directly extend JUnitSuite.

like image 151
Jeffrey Chung Avatar answered Oct 28 '22 07:10

Jeffrey Chung