Skip to content

Commit

Permalink
Fix Test Pollution
Browse files Browse the repository at this point in the history
- Some (non-Spring) tests had a real live JDBC connection!!!

[#163036760] https://www.pivotaltracker.com/story/show/163036760

Signed-off-by: Joshua Casey <jcasey@pivotal.io>
Co-authored-by: Joshua Casey <jcasey@pivotal.io>
  • Loading branch information
DennisDenuto and joshuatcasey committed Feb 6, 2019
1 parent 3211763 commit b479089
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class AutologinAuthenticationManagerTest {
@Before
public void setUp() {
IdentityZoneHolder.clear();
IdentityZoneHolder.setProvisioning(null);
clientId = new RandomValueStringGenerator().generate();
manager = new AutologinAuthenticationManager();
codeStore = mock(ExpiringCodeStore.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class UaaResetPasswordServiceTests {
public void setUp() throws Exception {
SecurityContextHolder.clearContext();
IdentityZoneHolder.clear();
IdentityZoneHolder.setProvisioning(null);
scimUserProvisioning = mock(ScimUserProvisioning.class);
codeStore = mock(ExpiringCodeStore.class);
passwordValidator = mock(PasswordValidator.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class UserGoogleMfaCredentialsProvisioningTest {

@Before
public void setup() {
IdentityZoneHolder.setProvisioning(null);
provisioner = new UserGoogleMfaCredentialsProvisioning();
mfaProvider = new MfaProvider().setName("abc").setId("abc");
otherMfaProvider = new MfaProvider().setName("abcd").setId("abcd");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@

public class SamlSessionStorageFactoryTests {


private SamlSessionStorageFactory factory;
private MockHttpServletRequest request;

@Before
public void setUp() throws Exception {
request = new MockHttpServletRequest();
factory = new SamlSessionStorageFactory();
IdentityZoneHolder.clear();
IdentityZoneHolder.setProvisioning(null);
}

@After
Expand Down

0 comments on commit b479089

Please sign in to comment.