Search in sources :

Example 1 with HttpConnectionInfo

use of org.neo4j.kernel.impl.query.clientconnection.HttpConnectionInfo in project neo4j by neo4j.

the class ClientConnectionInfoTest method connectionDetailsForHttpQuerySource.

@Test
public void connectionDetailsForHttpQuerySource() throws Exception {
    // given
    ClientConnectionInfo clientConnection = new HttpConnectionInfo("http", null, new InetSocketAddress("127.0.0.1", 1337), null, "/db/data/transaction/45/commit").withUsername("username");
    // when
    String connectionDetails = clientConnection.asConnectionDetails();
    // then
    assertEquals("server-session\thttp\t127.0.0.1\t/db/data/transaction/45/commit\tusername", connectionDetails);
}
Also used : ClientConnectionInfo(org.neo4j.kernel.impl.query.clientconnection.ClientConnectionInfo) InetSocketAddress(java.net.InetSocketAddress) HttpConnectionInfo(org.neo4j.kernel.impl.query.clientconnection.HttpConnectionInfo) Test(org.junit.Test)

Aggregations

InetSocketAddress (java.net.InetSocketAddress)1 Test (org.junit.Test)1 ClientConnectionInfo (org.neo4j.kernel.impl.query.clientconnection.ClientConnectionInfo)1 HttpConnectionInfo (org.neo4j.kernel.impl.query.clientconnection.HttpConnectionInfo)1