Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public Void call() throws Exception
            public override Void call()
            {
                // Connect
                TransportConnection client = outerInstance.NewConnection();

                client.Connect(_outerInstance.server.lookupDefaultConnector()).send(_outerInstance.util.defaultAcceptedVersions());
                assertThat(client, _outerInstance.util.eventuallyReceivesSelectedProtocolVersion());

                init(client);

                for (int i = 0; i < _iterationsToRun; i++)
                {
                    createAndRollback(client);
                }

                return(null);
            }
Esempio n. 2
0
        private FailureMessage CollectAuthFailureOnFailedAuth()
        {
            FailureMsgMatcher failureRecorder = new FailureMsgMatcher(this);

            TransportConnection connection = null;

            try
            {
                connection = NewConnection();

                connection.Connect(_address).send(Util.defaultAcceptedVersions()).send(Util.chunk(new InitMessage("TestClient/1.1", map("principal", "neo4j", "credentials", "WHAT_WAS_THE_PASSWORD_AGAIN", "scheme", "basic"))));

                assertThat(connection, Util.eventuallyReceivesSelectedProtocolVersion());
                assertThat(connection, Util.eventuallyReceives(failureRecorder));
                assertThat(connection, eventuallyDisconnects());
            }
            catch (Exception ex)
            {
                throw new Exception(ex);
            }
            finally
            {
                if (connection != null)
                {
                    try
                    {
                        connection.Disconnect();
                    }
                    catch (IOException ex)
                    {
                        throw new Exception(ex);
                    }
                }
            }

            return(failureRecorder.SpecialMessage);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.v1.transport.socket.client.TransportConnection connectAndPerformBoltHandshake(org.neo4j.bolt.v1.transport.socket.client.TransportConnection connection) throws Exception
        private TransportConnection ConnectAndPerformBoltHandshake(TransportConnection connection)
        {
            connection.Connect(Address).send(Util.acceptedVersions(1, 0, 0, 0));
            assertThat(connection, eventuallyReceives(new sbyte[] { 0, 0, 0, 1 }));
            return(connection);
        }