예제 #1
0
            internal virtual ServerInterface ServerInOtherJvm(int port)
            {
                ServerInterface server = (new MadeUpServerProcess()).Start(new StartupData(StoreIdConflict.CreationTime, StoreIdConflict.RandomId, InternalProtocolVersionConflict, ApplicationProtocolVersionConflict, ChunkSizeConflict, port));

                server.AwaitStarted();
                return(server);
            }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void communicateBetweenJvms()
        public virtual void CommunicateBetweenJvms()
        {
            ServerInterface server = _builder.serverInOtherJvm(_port);

            server.AwaitStarted();
            MadeUpClient client = _builder.port(_port).client();

            _life.add(client);
            _life.start();

            assertEquals(( int? )(9 * 5), client.Multiply(9, 5).response());
            client.FetchDataStream(new ToAssertionWriter(), 1024 * 1024 * 3);

            server.Shutdown();
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void internalProtocolVersionsMustMatchMultiJvm()
        public virtual void InternalProtocolVersionsMustMatchMultiJvm()
        {
            ServerInterface server = _builder.internalProtocolVersion(( sbyte )1).serverInOtherJvm(_port);

            server.AwaitStarted();
            MadeUpClient client = _builder.port(_port).internalProtocolVersion(( sbyte )2).client();

            _life.add(client);
            _life.start();

            try
            {
                client.Multiply(10, 20);
                fail("Shouldn't be able to communicate with different application protocol versions");
            }
            catch (IllegalProtocolVersionException)
            {
            }

            server.Shutdown();
        }