Skip to content

Commit

Permalink
Disable file upload tests while test infrastructure is replaced (#1792)
Browse files Browse the repository at this point in the history
Also make linux jobs run on 1ES hosted agent so that they can access the ACR container the TPM simulator image
  • Loading branch information
timtay-microsoft authored Jul 18, 2024
1 parent b323063 commit 9e627c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import lombok.extern.slf4j.Slf4j;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand Down Expand Up @@ -225,6 +226,7 @@ public void getSasUriWithoutUploadConnectionToggle() throws URISyntaxException,
}

@Test (timeout = MAX_MILLISECS_TIMEOUT_KILL_TEST)
@Ignore("Current test infrastructure doesn't support file upload to a storage account")
public void getAndCompleteSasUriWithUpload() throws URISyntaxException, IOException, InterruptedException, IotHubException, GeneralSecurityException, StorageException, TimeoutException, IotHubClientException
{
// Android has some compatibility issues with the azure storage SDK
Expand Down Expand Up @@ -258,8 +260,8 @@ public void getAndCompleteSasUriWithUpload() throws URISyntaxException, IOExcept
tearDownDeviceClient(deviceClient);
}

@FlakeyTest
@Test (timeout = MAX_MILLISECS_TIMEOUT_KILL_TEST)
@Ignore("Current test infrastructure doesn't support file upload to a storage account")
public void getAndCompleteSasUriWithMultipleUploads() throws URISyntaxException, IOException, InterruptedException, IotHubException, GeneralSecurityException, StorageException, TimeoutException, IotHubClientException
{
// Android has some compatibility issues with the azure storage SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -194,7 +195,7 @@ public static void removeDevices(Iterable<String> deviceIds, String connectionSt

String sasTokenString = new IotHubServiceSasToken(iotHubConnectionString).toString();

HttpRequest request = new HttpRequest(url, HttpMethod.POST, body.toJson().getBytes(), sasTokenString);
HttpRequest request = new HttpRequest(url, HttpMethod.POST, body.toJson().getBytes(StandardCharsets.UTF_8), sasTokenString);
request.setHeaderField("Accept", "application/json");
request.setHeaderField("Content-Type", "application/json");
request.setHeaderField("charset", "utf-8");
Expand Down
2 changes: 1 addition & 1 deletion vsts/windowsLinuxAndAndroidBuildMatrixConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
timeoutInMinutes: 180
pool:
# If this is changed, don't forget to update supported_platforms.md in the root directory. That document outlines what OS we test on and should stay up to date.
vmImage: 'ubuntu-22.04'
name: 'sdk-net--ubuntu-20'
displayName: Linux
strategy:
maxParallel: $[variables.maxParallel]
Expand Down

0 comments on commit 9e627c5

Please sign in to comment.