Skip to content
Snippets Groups Projects
Commit 76b7b30e authored by Adam Laskowski's avatar Adam Laskowski
Browse files

SSDM-13251: Commented out dependency to server-data-store

parent a14abfc6
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -9,39 +9,40 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import ch.ethz.sis.afs.manager.TransactionConnection;
import ch.ethz.sis.afsserver.server.Server;
import ch.ethz.sis.afsserver.server.observer.impl.DummyServerObserver;
import ch.ethz.sis.afsserver.startup.AtomicFileSystemServerParameter;
import ch.ethz.sis.shared.startup.Configuration;
//import ch.ethz.sis.afs.manager.TransactionConnection;
//import ch.ethz.sis.afsserver.server.Server;
//import ch.ethz.sis.afsserver.server.observer.impl.DummyServerObserver;
//import ch.ethz.sis.afsserver.startup.AtomicFileSystemServerParameter;
//import ch.ethz.sis.shared.startup.Configuration;
public class AfsClientTest
{
private static Server<TransactionConnection, ?> afsServer;
// private static Server<TransactionConnection, ?> afsServer;
private static AfsClient afsClient;
@BeforeClass
public static void classSetUp() throws Exception {
final Configuration configuration = new Configuration(List.of(AtomicFileSystemServerParameter.class),
"src/test/resources/afs-server-config.properties");
final DummyServerObserver dummyServerObserver = new DummyServerObserver();
afsServer = new Server<>(configuration, dummyServerObserver, dummyServerObserver);
final int httpServerPort = configuration.getIntegerProperty(AtomicFileSystemServerParameter.httpServerPort);
final String httpServerPath = configuration.getStringProperty(AtomicFileSystemServerParameter.httpServerUri);
afsClient = new AfsClient(new URI("http", null, "localhost", httpServerPort, httpServerPath, null, null));
// final Configuration configuration = new Configuration(List.of(AtomicFileSystemServerParameter.class),
// "src/test/resources/afs-server-config.properties");
// final DummyServerObserver dummyServerObserver = new DummyServerObserver();
// afsServer = new Server<>(configuration, dummyServerObserver, dummyServerObserver);
//
// final int httpServerPort = configuration.getIntegerProperty(AtomicFileSystemServerParameter.httpServerPort);
// final String httpServerPath = configuration.getStringProperty(AtomicFileSystemServerParameter.httpServerUri);
// afsClient = new AfsClient(new URI("http", null, "localhost", httpServerPort, httpServerPath, null, null));
}
@AfterClass
public static void classTearDown() throws Exception {
afsServer.shutdown(true);
// afsServer.shutdown(true);
}
@Test
public void testLogin() throws Exception {
final String token = afsClient.login("test", "test");
// final String token = afsClient.login("test", "test");
String token = "null";
assertNotNull(token);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment