public void can_be_assigned() { _num.SetValue(10); AtomicInteger y = _num; y.GetValue().Should().Be(10); }
public void TestTlsCertsFromDynamicStreamExpiredAndRenewCert() { AtomicInteger certIndex = new AtomicInteger(1); AtomicInteger keyIndex = new AtomicInteger(0); MemoryStream certStream = CreateByteInputStream(TlsClientCertFilePath); MemoryStream keyStream = CreateByteInputStream(TlsClientKeyFilePath); Func <MemoryStream> certProvider = () => GetStream(certIndex, certStream, keyStream); Func <MemoryStream> keyProvider = () => GetStream(keyIndex, keyStream); AuthenticationTls auth = new AuthenticationTls(certProvider, keyProvider); _common.GetPulsarSystem(auth, 1000, enableTls: true, brokerService: "pulsar.BrokerServiceUrlTls"); _common.PulsarSystem.PulsarConsumer(_common.CreateConsumer(BytesSchema.Of(), "persistent://my-property/use/my-ns/my-topic1", "TestTlsCertsFromDynamicStreamExpiredAndRenewCert", "my-subscriber-name")); certIndex.SetValue(0); _common.PulsarSystem.PulsarConsumer(_common.CreateConsumer(BytesSchema.Of(), "persistent://my-property/use/my-ns/my-topic1", "TestTlsCertsFromDynamicStreamExpiredAndRenewCert", "my-subscriber-name")); }