Skip to content

Commit

Permalink
Merge pull request #444 from krzysztof-moscichowski-smartbear/master
Browse files Browse the repository at this point in the history
Version 2.140
  • Loading branch information
szprutamich authored Mar 29, 2022
2 parents b64bcfb + e1479e9 commit 0470825
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 82 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.testdroid</groupId>
<artifactId>testdroid-api</artifactId>
<version>2.139</version>
<version>2.140</version>
<packaging>jar</packaging>
<name>Bitbar API v2</name>
<url>https://github.com/bitbar/testdroid-api</url>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/testdroid/api/APIEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
APILabelGroup.class,
APILicense.class,
APIList.class,
APIMarketShare.class,
APIMaintenance.class,
APINotification.class,
APINotificationPlan.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.testdroid.api.APIEntity;
import org.apache.commons.lang3.StringUtils;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.Arrays;
import java.util.List;

import static java.lang.Boolean.FALSE;
Expand Down Expand Up @@ -37,9 +35,8 @@ public Integer getAccountConcurrency() {
return accountConcurrency;
}

public APIAccountConcurrencyStatus setAccountConcurrency(Integer accountConcurrency) {
public void setAccountConcurrency(Integer accountConcurrency) {
this.accountConcurrency = accountConcurrency;
return this;
}

public Long getRunningSessions() {
Expand All @@ -66,17 +63,16 @@ public List<String> getUsedBy() {
return usedBy;
}

public APIAccountConcurrencyStatus setUnlimitedConcurrency(Boolean unlimitedConcurrency) {
public void setUnlimitedConcurrency(Boolean unlimitedConcurrency) {
this.unlimitedConcurrency = unlimitedConcurrency;
return this;
}

public APIAccountConcurrencyStatus(
Long accountId, String mainUserEmail, String userEmails, Long waitingSessions, Long runningSessions) {
Long accountId, String mainUserEmail, List<String> usedBy, Long waitingSessions, Long runningSessions) {
super(accountId);
this.runningSessions = runningSessions;
this.waitingSessions = waitingSessions;
this.usedBy = Arrays.asList(StringUtils.split(userEmails, ","));
this.usedBy = usedBy;
this.sessions = runningSessions + waitingSessions;
this.mainUserEmail = mainUserEmail;
this.unlimitedConcurrency = FALSE;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/testdroid/api/model/APIDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public enum Platform {
ANDROID(OsType.ANDROID),
WINDOWS(OsType.DESKTOP, "Windows"),
MAC(OsType.DESKTOP, "macOS"),
MACOS(OsType.DESKTOP, "oldMac"), // TODO: remove in 2.140
LINUX(OsType.DESKTOP, "Linux"),
UNDEFINED(OsType.UNDEFINED);

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/testdroid/api/model/APIDeviceSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public APIDeviceSession(
Integer testCasePassedCount, Integer testCaseFailedCount, Integer testCaseSkippedCount, Boolean billable,
Long deviceModelId, String displayName, String deviceManufacturer, Integer creditsPrice, String imagePrefix,
Integer imageTop, Integer imageLeft, Integer imageWidth, Integer imageHeight, Integer frameExtraWidth,
APIDevice.OsType osType, APIDevice.Platform platform ,Boolean enabled,
APIDevice.OsType osType, APIDevice.Platform platform, Boolean locked, Boolean enabled,
String releaseVersion, Integer apiLevel, ExcludeReason excludeReason, Long deviceInstanceId,
RetryState retryState, Integer autoRetriesLeftCount, Long deviceTime, Long duration, Long projectId,
String projectName, Long testRunId, String testRunName, Float successRatio, String name,
Expand All @@ -184,7 +184,7 @@ public APIDeviceSession(
this.endTime = TimeConverter.toDate(endTime);
this.device = new APIDevice(deviceModelId, displayName, deviceManufacturer, releaseVersion,
apiLevel, creditsPrice, imagePrefix, imageTop, imageLeft, imageWidth, imageHeight, frameExtraWidth,
osType, platform, null, null, enabled, null, null);
osType, platform, null, locked, enabled, null, null);
this.timeLimit = timeLimit;
this.deviceLogFirstTimestamp = deviceLogFirstTimestamp;
this.state = state;
Expand Down
67 changes: 0 additions & 67 deletions src/main/java/com/testdroid/api/model/APIMarketShare.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public class TypeReferenceFactory {
LIST_MAP.put(APIFramework.class, new TypeReference<APIList<APIFramework>>() {});
LIST_MAP.put(APILabelGroup.class, new TypeReference<APIList<APILabelGroup>>() {});
LIST_MAP.put(APILicense.class, new TypeReference<APIList<APILicense>>() {});
LIST_MAP.put(APIMarketShare.class, new TypeReference<APIList<APIMarketShare>>() {});
LIST_MAP.put(APINotification.class, new TypeReference<APIList<APINotification>>() {});
LIST_MAP.put(APINotificationPlan.class, new TypeReference<APIList<APINotificationPlan>>() {});
LIST_MAP.put(APIProject.class, new TypeReference<APIList<APIProject>>() {});
Expand Down Expand Up @@ -133,7 +132,6 @@ public class TypeReferenceFactory {
MAP.put(APILabelGroup.class, new TypeReference<APILabelGroup>() {});
MAP.put(APILicense.class, new TypeReference<APILicense>() {});
MAP.put(APIMaintenance.class, new TypeReference<APIMaintenance>() {});
MAP.put(APIMarketShare.class, new TypeReference<APIMarketShare>() {});
MAP.put(APIMessage.class, new TypeReference<APIMessage>() {});
MAP.put(APINotification.class, new TypeReference<APINotification>() {});
MAP.put(APINotificationPlan.class, new TypeReference<APINotificationPlan>() {});
Expand Down Expand Up @@ -171,6 +169,7 @@ public static <T extends APIEntity> TypeReference<APIList<T>> getListTypeRef(Cla
return (TypeReference<APIList<T>>) LIST_MAP.get(clazz);
}

@SuppressWarnings("unchecked")
public static <T extends APIEntity> TypeReference<APISimpleList<T>> getSimpleListTypeRef(Class<T> clazz) {
return (TypeReference<APISimpleList<T>>) SIMPLE_LIST_MAP.get(clazz);
}
Expand Down

0 comments on commit 0470825

Please sign in to comment.