コード例 #1
0
        public async Task can_connect_to_tls_ip_endpoint_gossip_seed()
        {
            var streamName = GetStreamName();

            using var connection = _fixture.CreateConnectionWithGossipSeeds(
                      builder => builder.UseSsl(true));
            await connection.ConnectAsync().WithTimeout();

            var writeResult =
                await connection.AppendToStreamAsync(streamName, ExpectedVersion.Any, TestEventGenerator.CreateTestEvents());

            Assert.True(writeResult.LogPosition.PreparePosition > 0);
        }
コード例 #2
0
        public async Task can_connect_to_tls_dns_endpoint_gossip_seed_with_connection_string()
        {
            var streamName = GetStreamName();

            using var connection = _fixture.CreateConnectionWithConnectionString(useSsl: true, useDnsEndPoint: true);
            await connection.ConnectAsync().WithTimeout();

            var writeResult =
                await connection.AppendToStreamAsync(streamName, ExpectedVersion.Any, TestEventGenerator.CreateTestEvents());

            Assert.True(writeResult.LogPosition.PreparePosition > 0);
        }
 public IEnumerable <EventData> CreateTestEvents(int count = 1, int metadataSize = 1) =>
 TestEventGenerator.CreateTestEvents(count, metadataSize);