Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove warning in code #385

Merged
merged 2 commits into from
Jul 20, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.microsoft.windowsazure.services.serviceBus;

Expand All @@ -20,12 +20,10 @@

public class Util {
public static Iterable<QueueInfo> iterateQueues(ServiceBusContract service) throws ServiceException {
// TODO: iterate over link rel=next pagination
return service.listQueues().getItems();
}

public static Iterable<TopicInfo> iterateTopics(ServiceBusContract service) throws ServiceException {
// TODO: iterate over link rel=next pagination
return service.listTopics().getItems();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ private void ThrowIfError(ClientResponse r) {
}

private String encodeODataURIValue(String value) {
//TODO: Unclear if OData value in URI's need to be encoded or not
return value;
}

Expand Down Expand Up @@ -757,7 +756,6 @@ private DataSource createBatchInsertOrUpdateEntityPart(String table, Entity enti
headers.addHeader("If-Match", entity.getEtag());
}

//TODO: Review code to make sure encoding is correct
ByteArrayOutputStream httpRequest = new ByteArrayOutputStream();
httpReaderWriter.appendMethod(httpRequest, verb, path);
httpReaderWriter.appendHeaders(httpRequest, headers);
Expand All @@ -780,7 +778,6 @@ private DataSource createBatchDeleteEntityPart(String table, String partitionKey
headers.addHeader("Content-ID", Integer.toString(contentId));
headers.addHeader("If-Match", etag == null ? "*" : etag);

//TODO: Review code to make sure encoding is correct
ByteArrayOutputStream httpRequest = new ByteArrayOutputStream();
httpReaderWriter.appendMethod(httpRequest, "DELETE", path);
httpReaderWriter.appendHeaders(httpRequest, headers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

public class MediaServiceScenarioTest extends ScenarioTestBase {
private static final String rootTestAssetPrefix = "testAssetPrefix-";
private static final String testJobPrefix = "testJobPrefix";
private static String testAssetPrefix;
private static MediaServiceWrapper wrapper;
private static MediaServiceValidation validator;
Expand All @@ -57,6 +58,7 @@ public static void setup() throws ServiceException {
public static void cleanup() throws ServiceException {
wrapper.removeAllAssetsWithPrefix(rootTestAssetPrefix);
wrapper.removeAllAccessPoliciesWithPrefix();
wrapper.removeAllJobWithPrefix(testJobPrefix);
}

@Test
Expand Down Expand Up @@ -119,7 +121,7 @@ public void createJob() throws Exception {
wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles());
signalSetupFinished();

String jobName = "my job createJob" + UUID.randomUUID().toString();
String jobName = testJobPrefix + UUID.randomUUID().toString();
JobInfo job = wrapper.createJob(jobName, asset, createTasks());
validator.validateJob(job, jobName, asset, createTasks());
}
Expand All @@ -129,7 +131,7 @@ public void transformAsset() throws Exception {
signalSetupStarting();
AssetInfo asset = wrapper.createAsset(testAssetPrefix + "transformAsset", AssetOption.None);
wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles());
String jobName = "my job transformAsset" + UUID.randomUUID().toString();
String jobName = testJobPrefix + UUID.randomUUID().toString();

JobInfo job = wrapper.createJob(jobName, asset,
wrapper.createTaskOptions("Transform", 0, 0, EncoderType.WindowsAzureMediaEncoder));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,19 @@ public void removeAllAccessPoliciesWithPrefix() throws ServiceException {
}
}

public void removeAllJobWithPrefix(String testJobPrefix) throws ServiceException {
List<JobInfo> jobInfos = service.list(Job.list());
for (JobInfo jobInfo : jobInfos) {
if (jobInfo.getName().startsWith(testJobPrefix)) {
try {
service.delete(Job.delete(jobInfo.getId()));
}
catch (ServiceException e) {
}
}
}
}

private static class EncryptionHelper {
public static boolean canUseStrongCrypto() {
try {
Expand Down