@@ -2,6 +2,8 @@ namespace Testcontainers.Pulsar;
22
33public abstract class PulsarContainerTest : IAsyncLifetime
44{
5+ private static readonly IReadOnlyDictionary < string , string > MemorySettings = new Dictionary < string , string > { { "PULSAR_MEM" , "-Xms256m -Xmx512m" } } ;
6+
57 private readonly PulsarContainer _pulsarContainer ;
68
79 private readonly bool _authenticationEnabled ;
@@ -69,7 +71,9 @@ public async Task ConsumerReceivesSendMessage()
6971 public sealed class PulsarDefaultConfiguration : PulsarContainerTest
7072 {
7173 public PulsarDefaultConfiguration ( )
72- : base ( new PulsarBuilder ( ) . Build ( ) , false )
74+ : base ( new PulsarBuilder ( )
75+ . WithEnvironment ( MemorySettings )
76+ . Build ( ) , false )
7377 {
7478 }
7579 }
@@ -79,7 +83,10 @@ public PulsarDefaultConfiguration()
7983 public sealed class PulsarAuthConfiguration : PulsarContainerTest
8084 {
8185 public PulsarAuthConfiguration ( )
82- : base ( new PulsarBuilder ( ) . WithAuthentication ( ) . Build ( ) , true )
86+ : base ( new PulsarBuilder ( )
87+ . WithAuthentication ( )
88+ . WithEnvironment ( MemorySettings )
89+ . Build ( ) , true )
8390 {
8491 }
8592 }
@@ -88,7 +95,10 @@ public PulsarAuthConfiguration()
8895 public sealed class PulsarV4Configuration : PulsarContainerTest
8996 {
9097 public PulsarV4Configuration ( )
91- : base ( new PulsarBuilder ( ) . WithImage ( "apachepulsar/pulsar:4.0.2" ) . Build ( ) , false )
98+ : base ( new PulsarBuilder ( )
99+ . WithImage ( "apachepulsar/pulsar:4.0.2" )
100+ . WithEnvironment ( MemorySettings )
101+ . Build ( ) , false )
92102 {
93103 }
94104 }
@@ -97,7 +107,11 @@ public PulsarV4Configuration()
97107 public sealed class PulsarV4AuthConfiguration : PulsarContainerTest
98108 {
99109 public PulsarV4AuthConfiguration ( )
100- : base ( new PulsarBuilder ( ) . WithImage ( "apachepulsar/pulsar:4.0.2" ) . WithAuthentication ( ) . Build ( ) , true )
110+ : base ( new PulsarBuilder ( )
111+ . WithImage ( "apachepulsar/pulsar:4.0.2" )
112+ . WithAuthentication ( )
113+ . WithEnvironment ( MemorySettings )
114+ . Build ( ) , true )
101115 {
102116 }
103117 }
0 commit comments