@@ -2,6 +2,8 @@ namespace Testcontainers.Pulsar;
2
2
3
3
public abstract class PulsarContainerTest : IAsyncLifetime
4
4
{
5
+ private static readonly IReadOnlyDictionary < string , string > MemorySettings = new Dictionary < string , string > { { "PULSAR_MEM" , "-Xms256m -Xmx512m" } } ;
6
+
5
7
private readonly PulsarContainer _pulsarContainer ;
6
8
7
9
private readonly bool _authenticationEnabled ;
@@ -69,7 +71,9 @@ public async Task ConsumerReceivesSendMessage()
69
71
public sealed class PulsarDefaultConfiguration : PulsarContainerTest
70
72
{
71
73
public PulsarDefaultConfiguration ( )
72
- : base ( new PulsarBuilder ( ) . Build ( ) , false )
74
+ : base ( new PulsarBuilder ( )
75
+ . WithEnvironment ( MemorySettings )
76
+ . Build ( ) , false )
73
77
{
74
78
}
75
79
}
@@ -79,7 +83,10 @@ public PulsarDefaultConfiguration()
79
83
public sealed class PulsarAuthConfiguration : PulsarContainerTest
80
84
{
81
85
public PulsarAuthConfiguration ( )
82
- : base ( new PulsarBuilder ( ) . WithAuthentication ( ) . Build ( ) , true )
86
+ : base ( new PulsarBuilder ( )
87
+ . WithAuthentication ( )
88
+ . WithEnvironment ( MemorySettings )
89
+ . Build ( ) , true )
83
90
{
84
91
}
85
92
}
@@ -88,7 +95,10 @@ public PulsarAuthConfiguration()
88
95
public sealed class PulsarV4Configuration : PulsarContainerTest
89
96
{
90
97
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 )
92
102
{
93
103
}
94
104
}
@@ -97,7 +107,11 @@ public PulsarV4Configuration()
97
107
public sealed class PulsarV4AuthConfiguration : PulsarContainerTest
98
108
{
99
109
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 )
101
115
{
102
116
}
103
117
}
0 commit comments