From e62d01a8b9e822826506d931be36536942735818 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 10 May 2013 10:26:11 -0700 Subject: [PATCH 1/2] fix a unit test failure on ci server. --- .../serviceruntime/Protocol1RuntimeGoalStateClientTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/serviceruntime/Protocol1RuntimeGoalStateClientTests.java b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/serviceruntime/Protocol1RuntimeGoalStateClientTests.java index 00a669a080ff..903dc9756fd7 100644 --- a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/serviceruntime/Protocol1RuntimeGoalStateClientTests.java +++ b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/serviceruntime/Protocol1RuntimeGoalStateClientTests.java @@ -153,7 +153,7 @@ public RoleEnvironmentData deserialize(InputStream stream) { } try { - Thread.sleep(1000); + Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); From 40d1b004ca7e75b7002263329e0471634294913a Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 10 May 2013 11:52:01 -0700 Subject: [PATCH 2/2] fix for issue 314, remove codehaus exception --- .../media/implementation/OAuthTokenManagerTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/implementation/OAuthTokenManagerTest.java b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/implementation/OAuthTokenManagerTest.java index 50794db32c08..ec76153f61a7 100644 --- a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/implementation/OAuthTokenManagerTest.java +++ b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/implementation/OAuthTokenManagerTest.java @@ -24,8 +24,6 @@ import java.util.Date; import java.util.TimeZone; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; @@ -64,8 +62,7 @@ public Date answer(InvocationOnMock invocation) throws Throwable { }); } - private void doIncrementingTokens() throws ServiceException, URISyntaxException, JsonParseException, - JsonMappingException, IOException { + private void doIncrementingTokens() throws ServiceException, URISyntaxException, IOException { doAnswer(new Answer() { int count = 0; @@ -82,8 +79,7 @@ public OAuthTokenResponse answer(InvocationOnMock invocation) throws Throwable { } @Test - public void clientUsesContractToGetToken() throws ServiceException, URISyntaxException, JsonParseException, - JsonMappingException, IOException { + public void clientUsesContractToGetToken() throws ServiceException, URISyntaxException, IOException { // Arrange doIncrementingTokens(); @@ -97,7 +93,7 @@ public void clientUsesContractToGetToken() throws ServiceException, URISyntaxExc @Test public void clientWillNotCallMultipleTimesWhileAccessTokenIsValid() throws ServiceException, URISyntaxException, - JsonParseException, JsonMappingException, IOException { + IOException { // Arrange doIncrementingTokens(); @@ -117,7 +113,7 @@ public void clientWillNotCallMultipleTimesWhileAccessTokenIsValid() throws Servi @Test public void clientWillBeCalledWhenTokenIsHalfwayToExpiring() throws ServiceException, URISyntaxException, - JsonParseException, JsonMappingException, IOException { + IOException { // Arrange doIncrementingTokens();