#22903 Fix code snippeds

* move scala and java sources out of paradox sources
* replace relative paths with $code$ and $akka$
* fix broken includes
This commit is contained in:
Martynas Mickevičius 2017-05-11 11:59:28 +03:00
parent 7bee495749
commit 81df4ff417
384 changed files with 1609 additions and 1602 deletions

View file

@ -1,42 +0,0 @@
/**
* Copyright (C) 2015-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package jdocs.cluster;
import akka.testkit.javadsl.TestKit;
import com.typesafe.config.ConfigFactory;
import jdocs.AbstractJavaTest;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import akka.actor.ActorSystem;
import akka.cluster.Cluster;
public class ClusterDocTest extends AbstractJavaTest {
static ActorSystem system;
@BeforeClass
public static void setup() {
system = ActorSystem.create("ClusterDocTest",
ConfigFactory.parseString(scala.docs.cluster.ClusterDocSpec.config()));
}
@AfterClass
public static void tearDown() {
TestKit.shutdownActorSystem(system);
system = null;
}
@Test
public void demonstrateLeave() {
//#leave
final Cluster cluster = Cluster.get(system);
cluster.leave(cluster.selfAddress());
//#leave
}
}