Skip to content

Commit b571497

Browse files
author
Christopher Frost
committed
BugFix for the GemFire session_replication support
The GemFire session replication code should not fire during the release phase unless a properly configered GemFire service is bound to the application. If it does it causes application deployment to fail, this commit fixes this bug. [#86291128]
1 parent 6f3de1a commit b571497

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

lib/java_buildpack/container/tomcat/tomcat_gemfire_store.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def sub_components(context)
5858

5959
# (see JavaBuildpack::Component::ModularComponent#command)
6060
def command
61+
return unless supports?
6162
credentials = @application.services.find_service(FILTER)['credentials']
6263
@droplet.java_opts.add_system_property 'gemfire.security-username', credentials[KEY_USERNAME]
6364
@droplet.java_opts.add_system_property 'gemfire.security-password', credentials[KEY_PASSWORD]

spec/java_buildpack/container/tomcat/tomcat_gemfire_store_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
expect(component.detect).to be_nil
5858
end
5959

60+
it 'does nothing without a session_replication service during release' do
61+
expect(component.command).to be_nil
62+
end
63+
6064
it 'creates submodules' do
6165
expect(JavaBuildpack::Container::GemFire)
6266
.to receive(:new).with(sub_configuration_context(gemfire_configuration))

0 commit comments

Comments
 (0)