Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 209.30 KB | None | 0 0
  1. package com.ericsson.radio.sw.testobjects.txmodule;
  2. 2
  3. 3 import java.util.ArrayList;
  4. 4 import java.util.List;
  5. 5
  6. 6 import org.testng.Assert;
  7. 7 import org.testng.annotations.AfterMethod;
  8. 8 import org.testng.annotations.BeforeMethod;
  9. 9 import org.testng.annotations.Test;
  10. 10
  11. 11 import se.ericsson.jcat.fw.annotations.JcatMethod;
  12. 12 import se.ericsson.jcat.fw.annotations.Setup;
  13. 13
  14. 14 import com.ericsson.radio.sw.framework.core.common.UserOptions;
  15. 15 import com.ericsson.radio.sw.framework.core.common.internal.RadioEnums.Bool;
  16. 16 import com.ericsson.radio.sw.framework.core.common.internal.RadioEnums.LinkDirection;
  17. 17 import com.ericsson.radio.sw.framework.core.common.internal.RadioEnums.RadioPlatform;
  18. 18 import com.ericsson.radio.sw.framework.core.common.internal.RadioEnums.RatType;
  19. 19 import com.ericsson.radio.sw.framework.core.common.internal.RadioEnums.TestGroup;
  20. 20 import com.ericsson.radio.sw.framework.core.jcat.ElvisLogger;
  21. 21 import com.ericsson.radio.sw.framework.core.jcat.RadioSwTestBase;
  22. 22 import com.ericsson.radio.sw.framework.core.jcat.internal.ElvisAssert;
  23. 23 import com.ericsson.radio.sw.framework.core.matcher.Parameters;
  24. 24 import com.ericsson.radio.sw.framework.core.result_handling.ProcedureResult;
  25. 25 import com.ericsson.radio.sw.framework.core.result_handling.ProcedureResult.Verdict;
  26. 26 import com.ericsson.radio.sw.framework.core.staticinfo.StaticInfo;
  27. 27 import com.ericsson.radio.sw.framework.core.staticinfo.band_info.Band.ArfcnRange;
  28. 28 import com.ericsson.radio.sw.framework.core.tcselection.Exclude;
  29. 29 import com.ericsson.radio.sw.framework.core.tcselection.Groups;
  30. 30 import com.ericsson.radio.sw.framework.core.tcselection.If;
  31. 31 import com.ericsson.radio.sw.framework.core.tcselection.Run;
  32. 32 import com.ericsson.radio.sw.framework.radiotest_utils.carrier.CarrierManagement;
  33. 33 import com.ericsson.radio.sw.framework.radiotest_utils.carrier.CarrierManagementFactory;
  34. 34 import com.ericsson.radio.sw.framework.radiotest_utils.carrier.CarrierUtils;
  35. 35 import com.ericsson.radio.sw.framework.radiotest_utils.carrier.WcdmaBasebandConfigurationUtils;
  36. 36 import com.ericsson.radio.sw.framework.radiotest_utils.carrier.internal.WcdmaCarrierManagement;
  37. 37 import com.ericsson.radio.sw.framework.radiotest_utils.coli.ColiCommandsUtils;
  38. 38 import com.ericsson.radio.sw.framework.radiotest_utils.connsetup.ConnSetupUtils;
  39. 39 import com.ericsson.radio.sw.framework.radiotest_utils.faulthandling.Fault;
  40. 40 import com.ericsson.radio.sw.framework.ru.resources.internal.AntennaBranchId;
  41. 41 import com.ericsson.radio.sw.framework.ru.resources.internal.Carrier;
  42. 42 import com.ericsson.radio.sw.framework.ru.resources.internal.Carrier.CarrierConstants;
  43. 43 import com.ericsson.radio.sw.framework.ru.resources.internal.CarrierType;
  44. 44 import com.ericsson.radio.sw.framework.ru.resources.internal.RfPort;
  45. 45 import com.ericsson.radio.sw.framework.ru.shell.memmappedcommand.MemMappedCommand;
  46. 46 import com.ericsson.radio.sw.framework.ru.shell.txm.brc.TxmSbpsCommand.SBPSEvent;
  47. 47 import com.ericsson.radio.sw.framework.ru.shell.txm.brc.TxmSbpsCommand.SBPSState;
  48. 48 import com.ericsson.radio.sw.framework.ru.shell.txm.brc.TxmSbpsDumpInfo;
  49. 49 import com.ericsson.radio.sw.framework.stp.MsiDuClient;
  50. 50 import com.ericsson.radio.sw.framework.stp.SystemTestPlantImpl;
  51. 51 import com.ericsson.radio.sw.framework.stp.WcdmaCarrier;
  52. 52 import com.ericsson.radio.sw.framework.stp.WcdmaDuClient;
  53. 53 import com.ericsson.radio.sw.framework.verifyutils.carriercontrol.VerifyCarrierControl;
  54. 54 import com.ericsson.radio.sw.framework.verifyutils.powersave.VerifySbps;
  55. 55 import com.ericsson.radio.sw.framework.verifyutils.txmodule.VerifyTxModule;
  56. 56 import com.ericsson.radio.sw.ose.signals.device.dc_tr.Const_dc_tr;
  57. 57
  58. 58 /**
  59. 59 * <b>ELVIS:</b> JCAT <b>E</b>xtension for <b>L</b>oops in <b>V</b>erification and
  60. 60 * <b>I</b>ntegration in <b>S</b>ubsystem at Radio SW
  61. 61 *
  62. 62 * <pre>
  63. 63 * G __
  64. 64 * \\ ,,)_
  65. 65 * \'-\( /
  66. 66 * \ | ,\
  67. 67 * \|_/\\
  68. 68 * / _ '.D
  69. 69 * / / \ |
  70. 70 * /_\ /_\
  71. 71 * '- '- </pre>
  72. 72 *
  73. 73 * @custom.purpose <p>
  74. 74 * Performs Symbol Based Power Saving "SBPS" logic tests.
  75. 75 * </p>
  76. 76 * @custom.references MIRA_ROOT/tests/testobjects/tx_module/spec/tx_sbps_logic_spec.rb
  77. 77 * @since Feb 02, 2016
  78. 78 * @custom.details
  79. 79 * <pre>
  80. 80 * ------------------------ Copyright ERICSSON AB 2016 ------------------------
  81. 81 * The programs may be used and/or copied only with the written permission from
  82. 82 * ERICSSON AB or in accordance with the terms and conditions stipulated in
  83. 83 * the agreement/contract under which the programs have been supplied.
  84. 84 * </pre>
  85. 85 */
  86. 86
  87. 87 public class SbpsLogic extends RadioSwTestBase {
  88. 88
  89. 89 /**
  90. 90 * @JcatTcDescription Perform SBPS logic tests.
  91. 91 * @JcatTcInstruction <br>
  92. 92 * This class verifies SBPS logic the following configurations:<br>
  93. 93 * <ul>
  94. 94 * <li>Verify SbpsSrv logic when starting and ending with an LTE carrier,
  95. 95 * prio A</li>
  96. 96 * </ul>
  97. 97 * <br>
  98. 98 * @JcatTcPreconditions BCI state: Connected.
  99. 99 * TR-DCI connection state: connected.
  100. 100 * Te log and HW log erased.
  101. 101 * @JcatTcAction ...
  102. 102 * @JcatTcActionResult ...
  103. 103 * @JcatTcPostcondtions ..
  104. 104 * @Area "SBPS" ...
  105. 105 * @JcatTcChapter SBPS<br/>
  106. 106 */
  107. 107 /*
  108. 108 * DEFINES
  109. 109 */
  110. 110 private static final String SBPS_DISABLED_TEXT = "Verify SBPS state DISABLED on branch ";
  111. 111 private static final String SBPS_ENABLED_TEXT = "Verify SBPS state ENABLED on branch ";
  112. 112 private static final String SBPS_AFFECTED_TEXT =
  113. 113 "Verify that activation on branch B hasn't affected state on branch A";
  114. 114 private static final int RF_PORT_ID_A = 0;
  115. 115 private static final int RF_PORT_ID_B = 1;
  116. 116 private static final int TPA_ID_ADD_FOR_BRANCH_A = 1;
  117. 117 private static final int TPA_ID_ADD_FOR_BRANCH_B = 2;
  118. 118
  119. 119 private static final int SLEEP_TIME = 200; // ms
  120. 120 private static final int RECOVERY_TIME = 3000; // ms
  121. 121 private static final int DAILY_RECOVERY_SLEEP_TIME = 5; // 3s recovery time + 2s for completing sw recovery cycle
  122. 122 private static final int DAILY_WINDOW_SIZE = 3 * DAILY_RECOVERY_SLEEP_TIME + 1; // 16s per day for 3 ru restart recovery
  123. 123 private static final int HIGH_TRAFFIC_RESTART_DELAY = 1000; // s
  124. 124 private static final int BRANCH_BUSY_DELAY = 100; // s
  125. 125
  126. 126 private static final String ELOG_SBPS_DISABLED_TXL_TEXT = "SBPS: Branch:A, disabled by TXL";
  127. 127 private static final String ELOG_SBPS_PERMANENTLY_DISABLED_TXL_TEXT = "SBPS: Branch:A, permanently disabled by TXL";
  128. 128 private static final String ELOG_SBPS_RECOVERED_TEXT = "SBPS: Branch:A, recovered/re-enabled";
  129. 129
  130. 130 private static final String PWR_SYNC_A_MSG_TO_0 = "0x00210810";
  131. 131
  132. 132 /* Helper */
  133. 133 private TxModuleHelper helper;
  134. 134 /* The Clients and the Carrier Managers */
  135. 135 private MsiDuClient msiClient = null;
  136. 136 private CarrierManagement msiCarrierManager = null;
  137. 137 private WcdmaDuClient wcdmaClient = null;
  138. 138 private WcdmaCarrierManagement wcdmaCarrierManager = null;
  139. 139 private Carrier dlLteCarrier = null;
  140. 140 private Carrier dlGsmCarrier = null;
  141. 141 private static ElvisLogger logger = ElvisLogger.getInstance();
  142. 142 /* GSM variables */
  143. 143 private static int SBPS_STATUS_GSM;
  144. 144 private static SBPSState SBPS_STATE_GSM = null;
  145. 145 private static String SBPS_TEXT_GSM = null;
  146. 146 private boolean RADIO_SBPS_CAPABLE_GSM = radioUnit.coli().db().autogetSingleValue("sbpsSupportedRat").contains("G");
  147. 147 /* Used for MR299 workaround on the R68JA */
  148. 148 private final int DRIVER_SET = radioUnit.coli().db().driverSetGet();
  149. 149 private final boolean MR299_SUPPORTED = ((DRIVER_SET >= 500) && (DRIVER_SET <= 599) && (DRIVER_SET != 519)) ? false
  150. 150 : true;
  151. 151
  152. 152 /**
  153. 153 * Check if radio has sbpsCapable.
  154. 154 * Also skip if sbps command is not available.
  155. 155 */
  156. 156 @Setup
  157. 157 public void sbpsSetup() {
  158. 158 if (!SystemTestPlantImpl.getInstance().defaultRadioUnit().coli().txm().sbps().isAvailable()) {
  159. 159 ElvisAssert.skip("Skipping since sbps command is not available.");
  160. 160 }
  161. 161 helper = TxModuleHelper.getInstance();
  162. 162
  163. 163 Carrier carrier = null;
  164. 164 List<RatType> supportedRatTypes = StaticInfo.getInstance().getRuInfo().getRu().getSupportedStandards();
  165. 165 if (supportedRatTypes.contains(RatType.LTE_FDD)) {
  166. 166 carrier = connectSetupActivatedLteTxCarrier(RatType.LTE_FDD);
  167. 167 } else if (supportedRatTypes.contains(RatType.LTE_TDD)) {
  168. 168 carrier = connectSetupActivatedLteTxCarrier(RatType.LTE_TDD);
  169. 169 } else if (supportedRatTypes.contains(RatType.GSM)) {
  170. 170 carrier = connectSetupActivatedGsmTxCarrier();
  171. 171 } else {
  172. 172 ElvisAssert.skip("Skipping since radio does not support LTE or GSM");
  173. 173 }
  174. 174
  175. 175 /*
  176. 176 * Even if the radio has sbpsCapable in the database still the radio has to
  177. 177 * check if the PA really can handle SBPS feature. The check is done when
  178. 178 * the first carrier is activated.
  179. 179 */
  180. 180 skipIfSlowPa(carrier);
  181. 181
  182. 182 // Release the carrier.
  183. 183 logger.addLogStep("Release the " + carrier.getRatType().toString() + " carrier");
  184. 184 msiCarrierManager.releaseCarrier(carrier);
  185. 185 logger.endLogStep();
  186. 186 sleepSeconds(5);
  187. 187
  188. 188 // Initialize GSM variables based on whether SBPS supports GSM or not
  189. 189
  190. 190 /*
  191. 191 * This part of the code is to prevent handling of SBPS for PL5 radios
  192. 192 * other than "519" because of the missing implementation that is
  193. 193 * delivered only on the MAIN track (R70)
  194. 194 */
  195. 195 if (!MR299_SUPPORTED)
  196. 196 {
  197. 197 RADIO_SBPS_CAPABLE_GSM = false;
  198. 198 }
  199. 199
  200. 200 SBPS_STATE_GSM = RADIO_SBPS_CAPABLE_GSM ? SBPSState.ENABLED : SBPSState.DISABLED;
  201. 201 SBPS_STATUS_GSM = RADIO_SBPS_CAPABLE_GSM ? helper.SBPS_STATUS_ENABLED
  202. 202 : helper.SBPS_STATUS_DISABLED;
  203. 203 SBPS_TEXT_GSM = RADIO_SBPS_CAPABLE_GSM ? SBPS_ENABLED_TEXT : SBPS_DISABLED_TEXT;
  204. 204
  205. 205 }
  206. 206
  207. 207 /**
  208. 208 * A method annotated with @BeforeMethod will execute before every @Test annotated method in the
  209. 209 * class.
  210. 210 */
  211. 211 @BeforeMethod
  212. 212 public void sbpsBeforeMethod() {
  213. 213 msiClient = stp.defaultDigitalUnit().getMsiClient();
  214. 214 ConnSetupUtils.open(msiClient);
  215. 215 msiCarrierManager = CarrierManagementFactory.getCarrierManagement(msiClient);
  216. 216 }
  217. 217
  218. 218 /**
  219. 219 * After method executes after every test case
  220. 220 */
  221. 221 @AfterMethod
  222. 222 public void sbpsAfterMethod() {
  223. 223 stp.defaultDigitalUnit().closeClients();
  224. 224 }
  225. 225
  226. 226 /**
  227. 227 * To verify SbpsSrv logic L+G.
  228. 228 * Details:
  229. 229 * -Setup LTE carrier (Branch A)
  230. 230 * -Send subscription request and check that report indication is received
  231. 231 * -Activate LTE carrier (Branch A),verify SbpsSrv state
  232. 232 * -Verify SbpsSrv state and carrier configuration, verify report indication
  233. 233 * -Setup GSM carrier (Branch B)
  234. 234 * -Send subscription request and check that report indication is received
  235. 235 * -Activate GSM carrier (Branch B),verify SbpsSrv state
  236. 236 * -Check that report indication is received (if SBPS supports GSM)
  237. 237 * -Release GSM carrier (Branch B),verify SbpsSrv state
  238. 238 * -Setup GSM carrier (Branch A)
  239. 239 * -Send subscription request and check that report indication is received
  240. 240 * -Activate GSM carrier (Branch A),verify SbpsSrv state
  241. 241 * -Check that report indications are received (if SBPS does not support GSM)
  242. 242 * -Deactivate GSM carrier, verify SbpsSrv state
  243. 243 * -Check that report indications are received (if SBPS does not support GSM)
  244. 244 * -Send subscription request and check that report indication is received
  245. 245 * -Reactivate GSM carrier, verify SbpsSrv state
  246. 246 * -Check that report indications are received (if SBPS does not support GSM)
  247. 247 * -Deactivate GSM carrier, verify SbpsSrv state
  248. 248 * -Check that report indications are received (if SBPS does not support GSM)
  249. 249 * -Release GSM carrier, verify SbpsSrv state
  250. 250 * -Release LTE carrier, verify SbpsSrv state
  251. 251 * Branch B carrier tests are only done if radio supports multiple TX branches.
  252. 252 * Migrated Mira TC:
  253. 253 * "TX_MOD C3, TC3: L+G, Verify SbpsSrv logic when starting and ending with an LTE carrier, prio 1"
  254. 254 */
  255. 255 @Test(enabled = true)
  256. 256 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC3:L+G",
  257. 257 testTitle = "Verify SbpsSrv logic when starting and ending with an LTE carrier.",
  258. 258 testReqRef = " ",
  259. 259 testPriority = "A")
  260. 260 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_50 })
  261. 261 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.GSM },
  262. 262 numTxBranchesMoreThan = 0,
  263. 263 supportSBPS = Bool.TRUE))
  264. 264 public void sbpsC3_TC3_LG() {
  265. 265 setTestCase("SBPS-TC3:L+G",
  266. 266 "Verify SbpsSrv logic when starting and ending with an LTE carrier, prio A");
  267. 267 /*
  268. 268 * Setup and activate an LTE carrier.
  269. 269 * carrierId = 0, port = A, axcId = 1
  270. 270 */
  271. 271 logger.addLogStep("Setup LTE carrier on branch" + AntennaBranchId.A);
  272. 272 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  273. 273 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  274. 274 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  275. 275 logger.endLogStep();
  276. 276
  277. 277 logger.addLogStep("Send subscription request and check that report indication is received");
  278. 278 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  279. 279 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  280. 280 logger.endLogStep();
  281. 281
  282. 282 logger.addLogStep("Activate LTE carrier on branch" + AntennaBranchId.A);
  283. 283 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  284. 284 logger.endLogStep();
  285. 285
  286. 286 /*
  287. 287 * Check if SBPS is enabled.
  288. 288 */
  289. 289 logger.addLogStep(SBPS_ENABLED_TEXT + "A");
  290. 290 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  291. 291 logger.endLogStep();
  292. 292
  293. 293 logger.addLogStep("Verify that report indication is received");
  294. 294 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  295. 295 logger.endLogStep();
  296. 296
  297. 297 /*
  298. 298 * If radio has more than 1 TX branch we will also setup GSM on
  299. 299 * branch B, therefore branch B is added to the branchList
  300. 300 * Also reverse the branch list since we want to add GSM on B and see that
  301. 301 * branch A is not affected when setting up GSM on branch B.
  302. 302 */
  303. 303 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  304. 304 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  305. 305 branchList.add(AntennaBranchId.B);
  306. 306 }
  307. 307 branchList.add(AntennaBranchId.A);
  308. 308 dlGsmCarrier = null;
  309. 309
  310. 310 for (AntennaBranchId currBranch : branchList) {
  311. 311 /*
  312. 312 * carrierId = x, port = x, axcId = 2
  313. 313 */
  314. 314 dlGsmCarrier = (currBranch == AntennaBranchId.A) ? createGsmTxCarrier(1, RF_PORT_ID_A, 2) :
  315. 315 createGsmTxCarrier(2, RF_PORT_ID_B, 2);
  316. 316
  317. 317 logger.addLogStep("Setup GSM carrier on branch" + currBranch);
  318. 318 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  319. 319 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  320. 320
  321. 321 logger.addLogStep("Send subscription requests for GSM carrier");
  322. 322 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  323. 323 logger.endLogStep();
  324. 324
  325. 325 if (currBranch == AntennaBranchId.B) {
  326. 326
  327. 327 logger.addLogStep("Verify that report indication is received");
  328. 328 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  329. 329 logger.endLogStep();
  330. 330
  331. 331 logger.addLogStep("Activate GSMcarrier on branch" + currBranch);
  332. 332 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  333. 333 logger.endLogStep();
  334. 334
  335. 335 logger.addLogStep("Verify SBPS state on branch" + currBranch);
  336. 336 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  337. 337 logger.endLogStep();
  338. 338
  339. 339 if (RADIO_SBPS_CAPABLE_GSM) {
  340. 340 logger.addLogStep("Verify that report indication is received");
  341. 341 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  342. 342 logger.endLogStep();
  343. 343 }
  344. 344
  345. 345 /* Verify that activation on branch B hasn't affected state on branch A */
  346. 346 logger.addLogStep(SBPS_AFFECTED_TEXT);
  347. 347 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  348. 348 logger.endLogStep();
  349. 349
  350. 350 logger.addLogStep("Releasing GSM carrier for branch " + currBranch);
  351. 351 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  352. 352 logger.endLogStep();
  353. 353
  354. 354 logger.addLogStep("Verify SBPS state on branch" + currBranch);
  355. 355 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  356. 356 logger.endLogStep();
  357. 357
  358. 358 } else {
  359. 359
  360. 360 if (!RADIO_SBPS_CAPABLE_GSM) {
  361. 361 logger.addLogStep("Verify that report indication is received");
  362. 362 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  363. 363 logger.endLogStep();
  364. 364 }
  365. 365
  366. 366 logger.addLogStep("Activate GSM carrier on branch" + currBranch);
  367. 367 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  368. 368 logger.endLogStep();
  369. 369
  370. 370 logger.addLogStep("Verify sbps state on branch" + currBranch);
  371. 371 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  372. 372 logger.endLogStep();
  373. 373
  374. 374 if (!RADIO_SBPS_CAPABLE_GSM) {
  375. 375 logger.addLogStep("Verify that report indications are received");
  376. 376 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  377. 377 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  378. 378 logger.endLogStep();
  379. 379 }
  380. 380
  381. 381 logger.addLogStep("Deactivate GSM carrier on branch " + currBranch);
  382. 382 Assert.assertTrue(msiCarrierManager.deActivateCarrier(dlGsmCarrier));
  383. 383 logger.endLogStep();
  384. 384
  385. 385 if (!RADIO_SBPS_CAPABLE_GSM) {
  386. 386 logger.addLogStep("Verify that report indications are received");
  387. 387 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  388. 388 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  389. 389 logger.endLogStep();
  390. 390 }
  391. 391
  392. 392 logger.addLogStep(SBPS_ENABLED_TEXT + currBranch);
  393. 393 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  394. 394 logger.endLogStep();
  395. 395
  396. 396 logger.addLogStep("Send subscription request and check that report indication is received");
  397. 397 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  398. 398 helper.verifyReportIndication(dlGsmCarrier, msiClient, SBPS_STATUS_GSM);
  399. 399 logger.endLogStep();
  400. 400
  401. 401 logger.addLogStep("Activate GSM carrier on branch " + currBranch);
  402. 402 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  403. 403 logger.endLogStep();
  404. 404
  405. 405 logger.addLogStep("Verify sbps state on branch" + currBranch);
  406. 406 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  407. 407 logger.endLogStep();
  408. 408
  409. 409 if (!RADIO_SBPS_CAPABLE_GSM) {
  410. 410 logger.addLogStep("Verify that report indications are received");
  411. 411 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  412. 412 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  413. 413 logger.endLogStep();
  414. 414 }
  415. 415
  416. 416 logger.addLogStep("Deactivate GSM carrier on branch " + currBranch);
  417. 417 Assert.assertTrue(msiCarrierManager.deActivateCarrier(dlGsmCarrier));
  418. 418 logger.endLogStep();
  419. 419
  420. 420 logger.addLogStep("Verify sbps state on branch" + currBranch);
  421. 421 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  422. 422 logger.endLogStep();
  423. 423
  424. 424 if (!RADIO_SBPS_CAPABLE_GSM) {
  425. 425 logger.addLogStep("Verify that report indications are received");
  426. 426 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  427. 427 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  428. 428 logger.endLogStep();
  429. 429 }
  430. 430
  431. 431 logger.addLogStep("Releasing GSM carrier for branch" + currBranch);
  432. 432 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  433. 433 logger.endLogStep();
  434. 434
  435. 435 logger.addLogStep("Verify sbps state on branch" + currBranch);
  436. 436 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  437. 437 logger.endLogStep();
  438. 438
  439. 439 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  440. 440 msiCarrierManager.releaseCarrier(dlLteCarrier);
  441. 441 logger.endLogStep();
  442. 442
  443. 443 if (RADIO_SBPS_CAPABLE_GSM) {
  444. 444 logger.addLogStep("Verify that report indication is received");
  445. 445 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  446. 446 logger.endLogStep();
  447. 447 }
  448. 448
  449. 449 logger.addLogStep("Verify sbps state on branch" + currBranch);
  450. 450 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  451. 451 logger.endLogStep();
  452. 452 }
  453. 453 }
  454. 454
  455. 455 }
  456. 456
  457. 457 /**
  458. 458 * To verify SbpsSrv logic L+G.
  459. 459 * Details:
  460. 460 * -Setup GSM carrier (Branch A)
  461. 461 * -Send subscription request and check that report indication is received
  462. 462 * -Activate GSM carrier (Branch A),verify SbpsSrv state
  463. 463 * -Check that report indication is received (if SBPS supports GSM)
  464. 464 * -Setup LTE carrier (Branch B)
  465. 465 * -Send subscription request and check that report indication is received
  466. 466 * -Activate LTE carrier (Branch B),verify SbpsSrv state
  467. 467 * -Release LTE carrier (Branch B),verify SbpsSrv state
  468. 468 * -Setup LTE carrier (Branch A)
  469. 469 * -Send subscription request and check that report indication is received
  470. 470 * -Activate LTE carrier (Branch A),verify SbpsSrv state
  471. 471 * -Deactivate LTE carrier, verify SbpsSrv state
  472. 472 * -Send subscription request and check that report indication is received
  473. 473 * -Reactivate LTE carrier, verify SbpsSrv state
  474. 474 * -Deactivate+release LTE carrier, verify SbpsSrv state
  475. 475 * -Release GSM carrier, verify SbpsSrv state
  476. 476 * -Check that report indication is received (if SBPS supports GSM)
  477. 477 * Branch B carrier tests are only done if radio supports multiple TX branches.
  478. 478 * Migrated Mira TC:
  479. 479 * "TX_MOD C3, TC4: L+G, Verify SbpsSrv logic when starting and ending with an GSM carrier, prio 1"
  480. 480 */
  481. 481 @Test(enabled = true)
  482. 482 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC4:L+G",
  483. 483 testTitle = "Verify SbpsSrv logic when starting and ending with a GSM carrier.",
  484. 484 testReqRef = " ",
  485. 485 testPriority = "A")
  486. 486 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  487. 487 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.GSM },
  488. 488 numTxBranchesMoreThan = 0,
  489. 489 supportSBPS = Bool.TRUE))
  490. 490 public void sbpsC3_TC4_LG() {
  491. 491 setTestCase("SBPS-TC4:L+G",
  492. 492 "Verify SbpsSrv logic when starting and ending with a GSM carrier, prio A");
  493. 493
  494. 494 logger.addLogStep("Setup GSM carrier on branch " + AntennaBranchId.A);
  495. 495 // carrierId = 0, port = A, axcId = 1
  496. 496 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  497. 497 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  498. 498 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  499. 499 /*
  500. 500 * Carrier frequency for GSM is calculated from ARFCN number which needs to be adjusted
  501. 501 * accordingly. Minimum ARFCN number used to setup carrier in the low edge of the frequency
  502. 502 * band thus needs to be increased in order to setup carrier 2.5 MHz away from the band low
  503. 503 * edge as stated above.
  504. 504 * Offset used (12) translated into frequency will give 12*200kHz(carrier BW)= 2.4 MHz
  505. 505 */
  506. 506 dlGsmCarrier.setArfcnMin(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  507. 507 .getArfcnRanges().get(0).getArfcnMin() + 12);
  508. 508 dlGsmCarrier.setArfcnMax(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  509. 509 .getArfcnRanges().get(0).getArfcnMin() + 12);
  510. 510 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  511. 511 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  512. 512 logger.endLogStep();
  513. 513
  514. 514 logger.addLogStep("Send subscription request and check that report indication is received");
  515. 515 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  516. 516 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  517. 517 logger.endLogStep();
  518. 518
  519. 519 logger.addLogStep("Activate GSM carrier on branch " + AntennaBranchId.A);
  520. 520 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  521. 521 logger.endLogStep();
  522. 522
  523. 523 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  524. 524 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  525. 525 logger.endLogStep();
  526. 526
  527. 527 if (RADIO_SBPS_CAPABLE_GSM) {
  528. 528 logger.addLogStep("Verify that report indication is received");
  529. 529 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  530. 530 logger.endLogStep();
  531. 531 }
  532. 532 /*
  533. 533 * If radio has more than 1 TX branch we will also setup LTE on
  534. 534 * Branch B, therefore Branch B is added to the branchList
  535. 535 * Also reverse the branch list since we want to add LTE on B and see that
  536. 536 * branch A is not affected when setting up LTE on Branch B.
  537. 537 */
  538. 538 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  539. 539 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  540. 540 branchList.add(AntennaBranchId.B);
  541. 541 }
  542. 542 branchList.add(AntennaBranchId.A);
  543. 543 Carrier dlLteCarrier = null;
  544. 544
  545. 545 for (AntennaBranchId currBranch : branchList) {
  546. 546
  547. 547 logger.addLogStep("Setup LTE carrier on branch " + currBranch);
  548. 548 dlLteCarrier = (currBranch == AntennaBranchId.A) ? createGsmTxCarrier(1, RF_PORT_ID_A, 2) :
  549. 549 createGsmTxCarrier(2, RF_PORT_ID_B, 2);
  550. 550 dlLteCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.LTE_FDD)
  551. 551 .get(0)
  552. 552 .getTxOperationBandLowEdge()
  553. 553 + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  554. 554 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  555. 555 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  556. 556 logger.endLogStep();
  557. 557
  558. 558 logger.addLogStep("Send subscription request for LTE carrier");
  559. 559 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  560. 560 logger.endLogStep();
  561. 561
  562. 562 if (currBranch == AntennaBranchId.B) {
  563. 563
  564. 564 logger.addLogStep("Verify sbps state on branch" + currBranch);
  565. 565 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  566. 566 logger.endLogStep();
  567. 567
  568. 568 logger.addLogStep("Verify that report indication is received");
  569. 569 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  570. 570 logger.endLogStep();
  571. 571
  572. 572 logger.addLogStep("Activate LTE carrier on branch " + currBranch);
  573. 573 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  574. 574 logger.endLogStep();
  575. 575
  576. 576 logger.addLogStep("Verify sbps state on branch" + currBranch);
  577. 577 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  578. 578 logger.endLogStep();
  579. 579
  580. 580 /* Verify that activation on Branch B hasn't affected state on Branch A */
  581. 581 logger.addLogStep(SBPS_AFFECTED_TEXT);
  582. 582 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  583. 583 logger.endLogStep();
  584. 584
  585. 585 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  586. 586 msiCarrierManager.releaseCarrier(dlLteCarrier);
  587. 587 logger.endLogStep();
  588. 588
  589. 589 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  590. 590 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  591. 591 logger.endLogStep();
  592. 592
  593. 593 } else {
  594. 594
  595. 595 logger.addLogStep("Verify that report indication is received");
  596. 596 helper.verifyReportIndication(dlLteCarrier, msiClient, SBPS_STATUS_GSM);
  597. 597 logger.endLogStep();
  598. 598
  599. 599 logger.addLogStep("Activate LTE carrier on branch " + currBranch);
  600. 600 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  601. 601 logger.endLogStep();
  602. 602
  603. 603 logger.addLogStep("Verify sbps state on branch" + currBranch);
  604. 604 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  605. 605 logger.endLogStep();
  606. 606
  607. 607 logger.addLogStep("Deactivate LTE carrier for branch " + currBranch);
  608. 608 Assert.assertTrue(msiCarrierManager.deActivateCarrier(dlLteCarrier));
  609. 609 logger.endLogStep();
  610. 610
  611. 611 logger.addLogStep("Verify sbps state on branch" + currBranch);
  612. 612 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  613. 613 logger.endLogStep();
  614. 614
  615. 615 logger.addLogStep("Send subscription request and check that report indication is received");
  616. 616 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  617. 617 helper.verifyReportIndication(dlLteCarrier, msiClient, SBPS_STATUS_GSM);
  618. 618 logger.endLogStep();
  619. 619
  620. 620 logger.addLogStep("Reactivate LTE carrier for branch " + currBranch);
  621. 621 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  622. 622 logger.endLogStep();
  623. 623
  624. 624 logger.addLogStep("Verify sbps state on branch" + currBranch);
  625. 625 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  626. 626 logger.endLogStep();
  627. 627
  628. 628 logger.addLogStep("Deactivate LTE carrier on branch " + currBranch);
  629. 629 Assert.assertTrue(msiCarrierManager.deActivateCarrier(dlLteCarrier));
  630. 630 logger.endLogStep();
  631. 631
  632. 632 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  633. 633 msiCarrierManager.releaseCarrier(dlLteCarrier);
  634. 634 logger.endLogStep();
  635. 635
  636. 636 logger.addLogStep("Verify sbps state on branch" + currBranch);
  637. 637 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  638. 638 logger.endLogStep();
  639. 639
  640. 640 logger.addLogStep("Releasing GSM carrier for branch " + currBranch);
  641. 641 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  642. 642 logger.endLogStep();
  643. 643
  644. 644 if (RADIO_SBPS_CAPABLE_GSM) {
  645. 645 logger.addLogStep("Verify that report indication is received");
  646. 646 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  647. 647 logger.endLogStep();
  648. 648 }
  649. 649
  650. 650 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  651. 651 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  652. 652 logger.endLogStep();
  653. 653 }
  654. 654 }
  655. 655 }
  656. 656
  657. 657 /**
  658. 658 * To verify SbpsSrv logic L+G.
  659. 659 * Details:
  660. 660 * -Setup LTE carrier
  661. 661 * -Send subscription request and check that report indication is received
  662. 662 * -Activate LTE carrier, verify SbpsSrv state
  663. 663 * -Check that report indication is received
  664. 664 * -Setup GSM carrier
  665. 665 * -Send subscription request and check that report indication is received
  666. 666 * -Activate GSM carrier, verify SbpsSrv staten
  667. 667 * -Check that report indications are received (if SBPS does not support GSM)
  668. 668 * -Release LTE carrier, verify SbpsSrv state
  669. 669 * -Release GSM carrier, verify SbpsSrv state
  670. 670 * Migrated Mira TC:
  671. 671 * "TX_MOD C3, TC5: L+G, Verify SbpsSrv logic when starting with an LTE carrier and ending with a GSM carrier, prio 1"
  672. 672 */
  673. 673 @Test(enabled = true)
  674. 674 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC5:L+G",
  675. 675 testTitle = "To verify SbpsSrv logic when starting with an LTE carrier and ending with a GSM carrier.",
  676. 676 testReqRef = " ",
  677. 677 testPriority = "A")
  678. 678 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  679. 679 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.GSM },
  680. 680 numTxBranchesMoreThan = 0,
  681. 681 supportSBPS = Bool.TRUE))
  682. 682 public void sbpsC3_TC5_LG() {
  683. 683 setTestCase("SBPS-TC5:L+G",
  684. 684 "To verify SbpsSrv logic when starting with an LTE carrier and ending with a GSM carrier.");
  685. 685
  686. 686 /*
  687. 687 * Setup and activate an LTE carrier.
  688. 688 * carrierId = 0, port = A, axcId = 1
  689. 689 */
  690. 690 logger.addLogStep("Setup LTE carrier on branch" + AntennaBranchId.A);
  691. 691 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  692. 692 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  693. 693 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  694. 694 logger.endLogStep();
  695. 695
  696. 696 logger.addLogStep("Send subscription request and check that report indication is received");
  697. 697 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  698. 698 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  699. 699 logger.endLogStep();
  700. 700
  701. 701 logger.addLogStep("Activate LTE carrier on branch" + AntennaBranchId.A);
  702. 702 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  703. 703 logger.endLogStep();
  704. 704
  705. 705 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  706. 706 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  707. 707 logger.endLogStep();
  708. 708
  709. 709 logger.addLogStep("Verify that report indication is received");
  710. 710 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  711. 711 logger.endLogStep();
  712. 712
  713. 713 /*
  714. 714 * Setup and activate an GSM carrier.
  715. 715 * carrierId = 1, port = A, axcId = 1
  716. 716 */
  717. 717 logger.addLogStep("Setup GSM carrier on branch" + AntennaBranchId.A);
  718. 718 Carrier dlGsmCarrier = createGsmTxCarrier(1, RF_PORT_ID_A, 1);
  719. 719 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  720. 720 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  721. 721 logger.endLogStep();
  722. 722
  723. 723 logger.addLogStep("Send subscription request and check that report indication is received");
  724. 724 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  725. 725 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  726. 726 logger.endLogStep();
  727. 727
  728. 728 logger.addLogStep("Activate GSM carrier on branch " + AntennaBranchId.A);
  729. 729 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  730. 730 logger.endLogStep();
  731. 731
  732. 732 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  733. 733 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  734. 734 logger.endLogStep();
  735. 735
  736. 736 if (!RADIO_SBPS_CAPABLE_GSM) {
  737. 737 logger.addLogStep("Verify that report indications are received");
  738. 738 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  739. 739 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  740. 740 logger.endLogStep();
  741. 741 }
  742. 742
  743. 743 logger.addLogStep("Releasing LTE carrier for branch" + AntennaBranchId.A);
  744. 744 msiCarrierManager.releaseCarrier(dlLteCarrier);
  745. 745 logger.endLogStep();
  746. 746
  747. 747 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  748. 748 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  749. 749 logger.endLogStep();
  750. 750
  751. 751 logger.addLogStep("Releasing GSM carrier for branch" + AntennaBranchId.A);
  752. 752 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  753. 753 logger.endLogStep();
  754. 754
  755. 755 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  756. 756 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  757. 757 logger.endLogStep();
  758. 758
  759. 759 }
  760. 760
  761. 761 /**
  762. 762 * To verify SbpsSrv logic L+G.
  763. 763 * Details:
  764. 764 * -Setup GSM carrier
  765. 765 * -Send subscription request and check that report indication is received
  766. 766 * -Activate GSM carrier,verify SbpsSrv state
  767. 767 * -Check that report indication is received (if SBPS supports GSM)
  768. 768 * -Setup LTE carrier
  769. 769 * -Send subscription request and check that report indication is received
  770. 770 * -Activate LTE carrier,verify SbpsSrv state
  771. 771 * -Check that report indication is received (if SBPS supports GSM),verify SbpsSrv state
  772. 772 * -Release GSM carrier
  773. 773 * -Check that report indication is received (if SBPS does not support GSM),verify SbpsSrv state
  774. 774 * -Release LTE carrier,verify SbpsSrv state
  775. 775 * Migrated Mira TC:
  776. 776 * "TX_MOD C3, TC6: L+G, Verify SbpsSrv logic when starting with a GSM carrier and ending with an LTE carrier, prio 1"
  777. 777 */
  778. 778 @Test(enabled = true)
  779. 779 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC6:L+G",
  780. 780 testTitle = "Verify SbpsSrv logic when starting with a GSM carrier and ending with an LTE carrier.",
  781. 781 testReqRef = " ",
  782. 782 testPriority = "A")
  783. 783 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  784. 784 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.GSM },
  785. 785 numTxBranchesMoreThan = 0,
  786. 786 supportSBPS = Bool.TRUE))
  787. 787 public void sbpsC3_TC6_LG() {
  788. 788 setTestCase("SBPS-TC6:L+G",
  789. 789 "Verify SbpsSrv logic when starting with a GSM carrier and ending with an LTE carrier, prio A");
  790. 790
  791. 791 logger.addLogStep("Setup GSM carrier on branch " + AntennaBranchId.A);
  792. 792 /*
  793. 793 * carrierId = 0, port = A, axcId = 1
  794. 794 */
  795. 795 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  796. 796 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  797. 797 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  798. 798 /*
  799. 799 * Carrier frequency for GSM is calculated from ARFCN number which needs to be adjusted
  800. 800 * accordingly. Minimum ARFCN number used to setup carrier in the low edge of the frequency
  801. 801 * band thus needs to be increased in order to setup carrier 2.5 MHz away from the band low
  802. 802 * edge as stated above.
  803. 803 * Offset used (12) translated into frequency will give 12*200kHz(carrier BW)= 2.4 MHz
  804. 804 */
  805. 805 dlGsmCarrier.setArfcnMin(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  806. 806 .getArfcnRanges().get(0).getArfcnMin() + 12);
  807. 807 dlGsmCarrier.setArfcnMax(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  808. 808 .getArfcnRanges().get(0).getArfcnMin() + 12);
  809. 809 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  810. 810 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  811. 811 logger.endLogStep();
  812. 812
  813. 813 logger.addLogStep("Send subscription request and check that report indication is received");
  814. 814 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  815. 815 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  816. 816 logger.endLogStep();
  817. 817
  818. 818 logger.addLogStep("Activate GSM carrier on branch " + AntennaBranchId.A);
  819. 819 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  820. 820 logger.endLogStep();
  821. 821
  822. 822 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  823. 823 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  824. 824 logger.endLogStep();
  825. 825
  826. 826 if (RADIO_SBPS_CAPABLE_GSM) {
  827. 827 logger.addLogStep("Verify that report indication is received");
  828. 828 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  829. 829 logger.endLogStep();
  830. 830 }
  831. 831
  832. 832 /*
  833. 833 * carrierId = 1, port = A, axcId = 1
  834. 834 */
  835. 835 logger.addLogStep("Setup LTE carrier on branch " + AntennaBranchId.A);
  836. 836 dlLteCarrier = createLteTxCarrier(1, RF_PORT_ID_A, 1);
  837. 837 dlLteCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.LTE_FDD)
  838. 838 .get(0)
  839. 839 .getTxOperationBandLowEdge()
  840. 840 + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  841. 841 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  842. 842 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  843. 843 logger.endLogStep();
  844. 844
  845. 845 logger.addLogStep("Send subscription request");
  846. 846 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  847. 847 helper.verifyReportIndication(dlLteCarrier, msiClient, SBPS_STATUS_GSM);
  848. 848 logger.endLogStep();
  849. 849
  850. 850 logger.addLogStep("Activate LTE carrier on branch " + AntennaBranchId.A);
  851. 851 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  852. 852 logger.endLogStep();
  853. 853
  854. 854 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  855. 855 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  856. 856 logger.endLogStep();
  857. 857
  858. 858 logger.addLogStep("Releasing GSM carrier for branch " + AntennaBranchId.A);
  859. 859 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  860. 860 logger.endLogStep();
  861. 861
  862. 862 if (!RADIO_SBPS_CAPABLE_GSM) {
  863. 863 logger.addLogStep("Verify that report indication is received");
  864. 864 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  865. 865 logger.endLogStep();
  866. 866 }
  867. 867
  868. 868 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  869. 869 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  870. 870 logger.endLogStep();
  871. 871
  872. 872 logger.addLogStep("Releasing LTE carrier for branch " + AntennaBranchId.A);
  873. 873 msiCarrierManager.releaseCarrier(dlLteCarrier);
  874. 874 logger.endLogStep();
  875. 875 sleepSeconds(5);
  876. 876
  877. 877 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  878. 878 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  879. 879 logger.endLogStep();
  880. 880
  881. 881 }
  882. 882
  883. 883 /**
  884. 884 * Verify RU does not restart SBPS after fault is raised from TXL if the current carrier
  885. 885 * configuration is at mixed mode
  886. 886 * Details:
  887. 887 * -Setup LTE carrier
  888. 888 * -Send subscription request and check that report indication is received
  889. 889 * -Activate LTE carrier,verify SbpsSrv state
  890. 890 * -Check that report indication is received
  891. 891 * -Setup GSM carrier
  892. 892 * -Send subscription request and check that report indication is received
  893. 893 * -Activate GSM carrier,verify SbpsSrv state
  894. 894 * -Check that report indications are received (if SBPS does not support GSM)
  895. 895 * -Raise SBPS failed event using the injection tool (if SBPS supports GSM)
  896. 896 * -Verify SbpsSrv state
  897. 897 * -Deactivate GSM carrier,verify SbpsSrv state
  898. 898 * -Check that report indications are received
  899. 899 * -Release carriers, verify SbpsSrv state
  900. 900 * Migrated Mira TC:
  901. 901 * "TX_MOD C2, TC6: L+G, Verify RU does not restart SBPS after fault is raised
  902. 902 * from TXL if the current carrier configuration is at mixed mode, prio 2"
  903. 903 */
  904. 904 @Test(enabled = true)
  905. 905 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC6:L+G",
  906. 906 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL if the current carrier configuration is at mixed mode",
  907. 907 testReqRef = " ",
  908. 908 testPriority = "B")
  909. 909 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  910. 910 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.GSM },
  911. 911 numTxBranchesMoreThan = 0,
  912. 912 supportSBPS = Bool.TRUE))
  913. 913 public void sbpsC2_TC6_LG() {
  914. 914 setTestCase(
  915. 915 "SBPS-C2-TC6:L+G",
  916. 916 "Verify RU does not restart SBPS after fault is raised from TXL if the current carrier configuration is at mixed mode, prio B");
  917. 917
  918. 918 /*
  919. 919 * Setup and activate an LTE carrier.
  920. 920 * carrierId = 0, port = A, axcId = 1
  921. 921 */
  922. 922 logger.addLogStep("Setup LTE carrier on branch" + AntennaBranchId.A);
  923. 923 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  924. 924 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  925. 925 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  926. 926 logger.endLogStep();
  927. 927
  928. 928 logger.addLogStep("Send subscription request and check that report indication is received");
  929. 929 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  930. 930 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  931. 931 logger.endLogStep();
  932. 932
  933. 933 logger.addLogStep("Activate LTE carrier on branch " + AntennaBranchId.A);
  934. 934 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  935. 935 logger.endLogStep();
  936. 936
  937. 937 /*
  938. 938 * Check if SBPS is enabled
  939. 939 */
  940. 940 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  941. 941 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  942. 942 logger.endLogStep();
  943. 943
  944. 944 logger.addLogStep("Verify that report indication is received");
  945. 945 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  946. 946 logger.endLogStep();
  947. 947
  948. 948 /*
  949. 949 * Setup and activate GSM carrier
  950. 950 * carrierId = 1, port = A, axcId = 1
  951. 951 */
  952. 952 logger.addLogStep("Setup GSM carrier on branch" + AntennaBranchId.A);
  953. 953 Carrier dlGsmCarrier = createGsmTxCarrier(1, RF_PORT_ID_A, 1);
  954. 954 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  955. 955 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  956. 956 logger.endLogStep();
  957. 957
  958. 958 logger.addLogStep("Send subscription request and check that report indication is received");
  959. 959 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  960. 960 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  961. 961 logger.endLogStep();
  962. 962
  963. 963 logger.addLogStep("Activate GSM carrier on branch " + AntennaBranchId.A);
  964. 964 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  965. 965 logger.endLogStep();
  966. 966 sleepSeconds(1);
  967. 967
  968. 968 /*
  969. 969 * Check SBPS state.
  970. 970 */
  971. 971 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  972. 972 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  973. 973 logger.endLogStep();
  974. 974
  975. 975 if (!RADIO_SBPS_CAPABLE_GSM) {
  976. 976 logger.addLogStep("Verify that report indications are received");
  977. 977 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  978. 978 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  979. 979 logger.endLogStep();
  980. 980 }
  981. 981 else
  982. 982 {
  983. 983 /*
  984. 984 * Inject fault only when GSM carrier is supported for SBPS
  985. 985 * Raise the fault is enabled.
  986. 986 */
  987. 987 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  988. 988 sleepSeconds(1);
  989. 989
  990. 990 /*
  991. 991 * Check SBPS state.
  992. 992 */
  993. 993 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  994. 994 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  995. 995 logger.endLogStep();
  996. 996
  997. 997 logger.addLogStep("Verify that report indications are received");
  998. 998 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  999. 999 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1000. 1000 logger.endLogStep();
  1001. 1001 }
  1002. 1002
  1003. 1003 /*
  1004. 1004 * Deactivate+release GSM carrier and release LTE carrier.
  1005. 1005 */
  1006. 1006 logger.addLogStep("Deactivate GSM carrier for branch" + AntennaBranchId.A);
  1007. 1007 Assert.assertTrue(msiCarrierManager.deActivateCarrier(dlGsmCarrier));
  1008. 1008 logger.endLogStep();
  1009. 1009
  1010. 1010 logger.addLogStep("Verify sbps state on branch" + AntennaBranchId.A);
  1011. 1011 if (RADIO_SBPS_CAPABLE_GSM) {
  1012. 1012 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  1013. 1013 } else {
  1014. 1014 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  1015. 1015 logger.addLogStep("Verify that report indications are received");
  1016. 1016 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1017. 1017 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1018. 1018 logger.endLogStep();
  1019. 1019 }
  1020. 1020 logger.endLogStep();
  1021. 1021
  1022. 1022 logger.addLogStep("Releasing GSM carrier for branch" + AntennaBranchId.A);
  1023. 1023 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  1024. 1024 logger.endLogStep();
  1025. 1025
  1026. 1026 logger.addLogStep("Releasing LTE carrier for branch" + AntennaBranchId.A);
  1027. 1027 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1028. 1028 logger.endLogStep();
  1029. 1029
  1030. 1030 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  1031. 1031 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1032. 1032 logger.endLogStep();
  1033. 1033
  1034. 1034 /*
  1035. 1035 * Restart the radio:
  1036. 1036 * After the coli command 'txm brc a sbps-not-supported' (fault injection), parameter
  1037. 1037 * isSbpsCapable remains in the state False. It is not possible to return to
  1038. 1038 * the initial state (isSbpsCapable=True) with a coli command.
  1039. 1039 * Therefore, it is necessary to restart the radio.
  1040. 1040 */
  1041. 1041 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  1042. 1042 }
  1043. 1043
  1044. 1044 /**
  1045. 1045 * To verify SbpsSrv logic L+W.
  1046. 1046 * Details:
  1047. 1047 * -Setup+activate LTE carrier (Branch A), verify SbpsSrv state and carrier configuration
  1048. 1048 * -Setup+activate WCDMA carrier (Branch B), verify SbpsSrv state and carrier configuration
  1049. 1049 * -Release WCDMA carrier (Branch B)
  1050. 1050 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1051. 1051 * -Deactivate WCDMA carrier, verify SbpsSrv state
  1052. 1052 * -Reactivate WCDMA carrier, verify SbpsSrv state
  1053. 1053 * -Deactivate+Release WCDMA carrier, verify SbpsSrv state
  1054. 1054 * -Release LTE carrier, verify SbpsSrv state
  1055. 1055 * Branch B carrier tests are only done if radio supports multiple TX branches.
  1056. 1056 * Migrated Mira TC:
  1057. 1057 * "TX_MOD C3, TC7: L+W, Verify SbpsSrv logic when starting and ending with an LTE carrier, prio 1"
  1058. 1058 */
  1059. 1059 @Test(enabled = true)
  1060. 1060 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC7:L+W",
  1061. 1061 testTitle = "Verify SbpsSrv logic when starting and ending with an LTE carrier.",
  1062. 1062 testReqRef = " ",
  1063. 1063 testPriority = "A")
  1064. 1064 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_50 })
  1065. 1065 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD, RatType.WCDMA },
  1066. 1066 supportsRatAllOf = { RatType.WCDMA, RatType.LTE_FDD },
  1067. 1067 numTxBranchesMoreThan = 0,
  1068. 1068 supportSBPS = Bool.TRUE))
  1069. 1069 public void sbpsC3_TC7_LW() {
  1070. 1070 setTestCase("SBPS-TC7:L+W",
  1071. 1071 "Verify SbpsSrv logic when starting and ending with an LTE carrier, prio A");
  1072. 1072
  1073. 1073 /*
  1074. 1074 * Setup and activate an LTE carrier.
  1075. 1075 * carrierId = 0, port = A, axcId = 1
  1076. 1076 */
  1077. 1077 logger.addLogStep("Setup, create and activate LTE carrier");
  1078. 1078 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  1079. 1079 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  1080. 1080 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  1081. 1081 Assert.assertTrue(msiCarrierManager.activateCarrier(dlLteCarrier));
  1082. 1082 logger.endLogStep();
  1083. 1083
  1084. 1084 /*
  1085. 1085 * Get WCDMA CM and connect to the RADIO
  1086. 1086 */
  1087. 1087 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1088. 1088 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  1089. 1089 .getCarrierManagement(wcdmaClient);
  1090. 1090
  1091. 1091 ConnSetupUtils.open(wcdmaClient);
  1092. 1092 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1093. 1093
  1094. 1094 /*
  1095. 1095 * Verify that TPA Settable Power is supported.
  1096. 1096 */
  1097. 1097 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1098. 1098
  1099. 1099 /*
  1100. 1100 * Since an LTE carrier is already activated, therefore we can start to check if
  1101. 1101 * SBPS is enabled.
  1102. 1102 */
  1103. 1103 logger.addLogStep(SBPS_ENABLED_TEXT + "A");
  1104. 1104 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  1105. 1105 logger.endLogStep();
  1106. 1106
  1107. 1107 /*
  1108. 1108 * If radio has more than 1 TX branch we will also setup WCDMA on
  1109. 1109 * branch B, therefore branch B is added to the branchList
  1110. 1110 * Also reverse the branch list since we want to add WCDMA on B and see that
  1111. 1111 * branch A is not affected when setting up WCDMA on branch B.
  1112. 1112 */
  1113. 1113 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  1114. 1114 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  1115. 1115 branchList.add(AntennaBranchId.B);
  1116. 1116 }
  1117. 1117 branchList.add(AntennaBranchId.A);
  1118. 1118 WcdmaCarrier dlWcdmaCarrier = null;
  1119. 1119
  1120. 1120 for (AntennaBranchId currBranch : branchList) {
  1121. 1121
  1122. 1122 int currTpaId = 0;
  1123. 1123 int currCarrierId = 0;
  1124. 1124 int currRfPort = 0;
  1125. 1125 int currAxcId = 0;
  1126. 1126
  1127. 1127 /*
  1128. 1128 * Used rfPort B for branch B and rfPort A for branch A
  1129. 1129 * carrierId = x, rfPort = x
  1130. 1130 */
  1131. 1131 if (currBranch == AntennaBranchId.B) {
  1132. 1132 currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_B;
  1133. 1133 currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 2;
  1134. 1134 currRfPort = RF_PORT_ID_B;
  1135. 1135 currAxcId = 2;
  1136. 1136 } else {
  1137. 1137 currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1138. 1138 currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1139. 1139 currRfPort = RF_PORT_ID_A;
  1140. 1140 currAxcId = 3;
  1141. 1141 }
  1142. 1142
  1143. 1143 logger.addLogStep("Modify power on branch " + currBranch);
  1144. 1144 Assert.assertTrue(setWcdmaTpaModifyPower(currBranch, currTpaId));
  1145. 1145 logger.endLogStep();
  1146. 1146
  1147. 1147 logger.addLogStep("Setup and activate WCDMA carriers on branch " + currBranch);
  1148. 1148 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1149. 1149 Assert.assertNotNull(dlWcdmaCarrier, "WCDMA carrier couldn't be created");
  1150. 1150 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1151. 1151 logger.endLogStep();
  1152. 1152
  1153. 1153 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1154. 1154 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1155. 1155 logger.endLogStep();
  1156. 1156
  1157. 1157 if (currBranch == AntennaBranchId.B) {
  1158. 1158 /* Verify that activation on branch B hasn't affected state on branch A */
  1159. 1159 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1160. 1160 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  1161. 1161 logger.endLogStep();
  1162. 1162
  1163. 1163 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1164. 1164 Assert.assertTrue(releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1165. 1165 logger.endLogStep();
  1166. 1166
  1167. 1167 } else {
  1168. 1168 logger.addLogStep("Deactivate WCDMA carrier for branch " + currBranch);
  1169. 1169 Assert.assertTrue(wcdmaCarrierManager.deActivateCarrier(dlWcdmaCarrier));
  1170. 1170 logger.endLogStep();
  1171. 1171 sleepSeconds(5);
  1172. 1172
  1173. 1173 logger.addLogStep(SBPS_ENABLED_TEXT + currBranch);
  1174. 1174 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  1175. 1175 logger.endLogStep();
  1176. 1176
  1177. 1177 logger.addLogStep("Activate WCDMA carrier for branch " + currBranch);
  1178. 1178 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1179. 1179 logger.endLogStep();
  1180. 1180 sleepSeconds(5);
  1181. 1181
  1182. 1182 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1183. 1183 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1184. 1184 logger.endLogStep();
  1185. 1185
  1186. 1186 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1187. 1187 Assert.assertTrue(releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1188. 1188 logger.endLogStep();
  1189. 1189 sleepSeconds(5);
  1190. 1190
  1191. 1191 logger.addLogStep(SBPS_ENABLED_TEXT + currBranch);
  1192. 1192 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  1193. 1193 logger.endLogStep();
  1194. 1194
  1195. 1195 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  1196. 1196 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1197. 1197 logger.endLogStep();
  1198. 1198 sleepSeconds(5);
  1199. 1199
  1200. 1200 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1201. 1201 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1202. 1202 logger.endLogStep();
  1203. 1203 }
  1204. 1204 }
  1205. 1205 logger.addLogStep(" clear baseband configurations ");
  1206. 1206 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  1207. 1207 logger.endLogStep();
  1208. 1208
  1209. 1209 }
  1210. 1210
  1211. 1211 /**
  1212. 1212 * To verify SbpsSrv logic L+W TC8.
  1213. 1213 * Purpose:
  1214. 1214 * To verify SbpsSrv logic when starting with a WCDMA carrier and ending with a WCDMA carrier.
  1215. 1215 * Details:
  1216. 1216 * -Setup+activate WCDMA carrier (Branch A), verify SbpsSrv state and carrier configuration
  1217. 1217 * -Setup+activate LTE carrier (branch B), verify SbpsSrv state and carrier configuration
  1218. 1218 * -Release LTE carrier (branch B)
  1219. 1219 * -Setup+activate LTE carrier (Branch A), verify SbpsSrv state and carrier configuration
  1220. 1220 * -Deactivate LTE carrier, verify SbpsSrv state
  1221. 1221 * -Reactivate LTE carrier, verify SbpsSrv state
  1222. 1222 * -Deactivate+release LTE carrier, verify SbpsSrv state
  1223. 1223 * -Release WCDMA carrier
  1224. 1224 * Branch B carrier tests are only done if radio supports multiple tx branches.
  1225. 1225 * Migrated Mira TC:
  1226. 1226 * "TX_MOD C3, TC8: L+W, Verify SbpsSrv logic when starting and ending with an WCDMA carrier, prio 1"
  1227. 1227 * Testcase: tx_sbps_logic_lte_wcdma_c3_tc8
  1228. 1228 */
  1229. 1229 @Test(enabled = true)
  1230. 1230 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC8:L+W",
  1231. 1231 testTitle = "Verify SbpsSrv logic when starting and ending with a WCDMA carrier.",
  1232. 1232 testReqRef = " ",
  1233. 1233 testPriority = "A")
  1234. 1234 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  1235. 1235 @Run(@If(ratTypeConnection1OneOf = { RatType.LTE_FDD, RatType.WCDMA },
  1236. 1236 supportsRatAllOf = { RatType.WCDMA, RatType.LTE_FDD },
  1237. 1237 numTxBranchesMoreThan = 0,
  1238. 1238 supportSBPS = Bool.TRUE))
  1239. 1239 public void sbpsC3_TC8_LW() {
  1240. 1240 setTestCase("SBPS-TC8:L+W",
  1241. 1241 "Verify SbpsSrv logic when starting and ending with a WCDMA carrier, prio A");
  1242. 1242
  1243. 1243 // Get WCDMA CM and connect to the RADIO
  1244. 1244 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1245. 1245 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory.getCarrierManagement(wcdmaClient);
  1246. 1246
  1247. 1247 ConnSetupUtils.open(wcdmaClient);
  1248. 1248 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1249. 1249
  1250. 1250 // Verify that TPA Settable Power is supported.
  1251. 1251 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1252. 1252
  1253. 1253 // Create TPA device
  1254. 1254 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1255. 1255 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1256. 1256 int currRfPort = RF_PORT_ID_A;
  1257. 1257 int currAxcId = 2;
  1258. 1258 WcdmaCarrier dlWcdmaCarrier = null;
  1259. 1259 AntennaBranchId wcdmaBranch = AntennaBranchId.A;
  1260. 1260
  1261. 1261 logger.addLogStep("Modify power on branch " + wcdmaBranch + "wcdmaCurrierId = " + currCarrierId);
  1262. 1262 ElvisAssert.saveAssertTrue("Modify power on wcdmaBranch", setWcdmaTpaModifyPower(wcdmaBranch, currTpaId));
  1263. 1263 logger.endLogStep();
  1264. 1264
  1265. 1265 // Setup+activate WCDMA carrier on branch A
  1266. 1266 logger.addLogStep("Setup and activate WCDMA carriers on branch " + wcdmaBranch);
  1267. 1267 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1268. 1268 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  1269. 1269 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1270. 1270 logger.endLogStep();
  1271. 1271
  1272. 1272 logger.addLogStep(SBPS_DISABLED_TEXT + wcdmaBranch);
  1273. 1273 VerifySbps.verifySpbsState(wcdmaBranch, SBPSState.DISABLED);
  1274. 1274 logger.endLogStep();
  1275. 1275
  1276. 1276 // If radio has more than 1 TX branch we will also setup LTE on branch B,
  1277. 1277 // therefore branch B is added to the branchList
  1278. 1278 // Also reverse the branch list since we want to add LTE on B and see that
  1279. 1279 // branch A is not affected when setting up LTE on branch B.
  1280. 1280 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  1281. 1281 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  1282. 1282 branchList.add(AntennaBranchId.B);
  1283. 1283 }
  1284. 1284 branchList.add(AntennaBranchId.A);
  1285. 1285
  1286. 1286 // Reverse to perform branch B test first (if radio supports multiple tx)
  1287. 1287 for (AntennaBranchId currBranch : branchList) {
  1288. 1288
  1289. 1289 currAxcId = 1;
  1290. 1290 if (currBranch == AntennaBranchId.B) {
  1291. 1291 currRfPort = RF_PORT_ID_B;
  1292. 1292 currCarrierId = 2;
  1293. 1293 } else {
  1294. 1294 currRfPort = RF_PORT_ID_A;
  1295. 1295 currCarrierId = 3;
  1296. 1296 }
  1297. 1297
  1298. 1298 // Setup+activate LTE carrier
  1299. 1299 logger.addLogStep("Setup, create and activate LTE carrier");
  1300. 1300 dlLteCarrier = createLteTxCarrier(currCarrierId, currRfPort, currAxcId);
  1301. 1301 dlLteCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.LTE_FDD)
  1302. 1302 .get(0)
  1303. 1303 .getTxOperationBandLowEdge()
  1304. 1304 + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  1305. 1305 ElvisAssert.saveAssertNotNull("LTE carrier couldn't be created", dlLteCarrier);
  1306. 1306 ElvisAssert.saveAssertTrue("Setup LTE carrier", msiCarrierManager.setupCarrier(dlLteCarrier));
  1307. 1307 ElvisAssert.saveAssertTrue("Activate LTE carrier", msiCarrierManager.activateCarrier(dlLteCarrier));
  1308. 1308 logger.endLogStep();
  1309. 1309
  1310. 1310 if (currBranch == AntennaBranchId.B) {
  1311. 1311 logger.addLogStep(SBPS_ENABLED_TEXT + currBranch);
  1312. 1312 VerifySbps.verifySpbsState(AntennaBranchId.B, SBPSState.ENABLED);
  1313. 1313 logger.endLogStep();
  1314. 1314
  1315. 1315 // Verify that activation on branch B hasn't affected state on branch A
  1316. 1316 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1317. 1317 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1318. 1318 logger.endLogStep();
  1319. 1319
  1320. 1320 // Release LTE carrier on branch B
  1321. 1321 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  1322. 1322 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1323. 1323 logger.endLogStep();
  1324. 1324 sleepSeconds(5);
  1325. 1325
  1326. 1326 } else {
  1327. 1327 // Deactivate LTE carrier
  1328. 1328 logger.addLogStep("Deactivate LTE carrier for branch " + currBranch);
  1329. 1329 msiCarrierManager.deActivateCarrier(dlLteCarrier);
  1330. 1330 logger.endLogStep();
  1331. 1331
  1332. 1332 sleepSeconds(5);
  1333. 1333 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1334. 1334 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1335. 1335 logger.endLogStep();
  1336. 1336
  1337. 1337 // Reactivate LTE carrier
  1338. 1338 logger.addLogStep("Reactivate LTE carrier for branch " + currBranch);
  1339. 1339 ElvisAssert.saveAssertTrue("Reactive LTE carrier", msiCarrierManager.activateCarrier(dlLteCarrier));
  1340. 1340 logger.endLogStep();
  1341. 1341
  1342. 1342 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1343. 1343 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1344. 1344 logger.endLogStep();
  1345. 1345
  1346. 1346 // Deactivate+release LTE carrier
  1347. 1347 logger.addLogStep("Deactivate LTE carrier for branch " + currBranch);
  1348. 1348 msiCarrierManager.deActivateCarrier(dlLteCarrier);
  1349. 1349 logger.endLogStep();
  1350. 1350
  1351. 1351 logger.addLogStep("Releasing LTE carrier for branch " + currBranch);
  1352. 1352 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1353. 1353 logger.endLogStep();
  1354. 1354
  1355. 1355 sleepSeconds(5);
  1356. 1356 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1357. 1357 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1358. 1358 logger.endLogStep();
  1359. 1359
  1360. 1360 // Release WCDMA carrier
  1361. 1361 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1362. 1362 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1363. 1363 logger.endLogStep();
  1364. 1364 }
  1365. 1365 }
  1366. 1366
  1367. 1367 logger.addLogStep(" clear baseband configurations ");
  1368. 1368 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  1369. 1369 logger.endLogStep();
  1370. 1370 }
  1371. 1371
  1372. 1372 /**
  1373. 1373 * To verify SbpsSrv logic L+W TC9.
  1374. 1374 * Details:
  1375. 1375 * -Setup+activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  1376. 1376 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1377. 1377 * -Release LTE carrier, verify SbpsSrv state
  1378. 1378 * -Release WCDMA carrier
  1379. 1379 * Migrated Mira TC:
  1380. 1380 * "TX_MOD C3, TC9: L+W, Verify SbpsSrv logic when starting with an LTE carrier and ending with a WCDMA carrier, prio 1"
  1381. 1381 */
  1382. 1382 @Test(enabled = true)
  1383. 1383 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC9:L+W",
  1384. 1384 testTitle = "Verify SbpsSrv logic when starting with an LTE carrier and ending with a WCDMA carrier.",
  1385. 1385 testReqRef = " ",
  1386. 1386 testPriority = "A")
  1387. 1387 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  1388. 1388 @Run(@If(ratTypeConnection1OneOf = { RatType.LTE_FDD, RatType.WCDMA },
  1389. 1389 supportsRatAllOf = { RatType.WCDMA, RatType.LTE_FDD },
  1390. 1390 numTxBranchesMoreThan = 0,
  1391. 1391 supportSBPS = Bool.TRUE))
  1392. 1392 public void sbpsC3_TC9_LW() {
  1393. 1393 setTestCase("SBPS-TC9:L+W",
  1394. 1394 "Verify SbpsSrv logic when starting with an LTE carrier and ending with a WCDMA carrier, prio A");
  1395. 1395
  1396. 1396 /*
  1397. 1397 * Setup and activate an LTE carrier.
  1398. 1398 * carrierId = 0, port = A, axcId = 1
  1399. 1399 */
  1400. 1400 logger.addLogStep("Setup, create and activate LTE carrier");
  1401. 1401 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  1402. 1402 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  1403. 1403 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  1404. 1404 Assert.assertTrue(msiCarrierManager.activateCarrier(dlLteCarrier));
  1405. 1405 logger.endLogStep();
  1406. 1406
  1407. 1407 // Get WCDMA CM and connect to the RADIO
  1408. 1408 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1409. 1409 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  1410. 1410 .getCarrierManagement(wcdmaClient);
  1411. 1411
  1412. 1412 ConnSetupUtils.open(wcdmaClient);
  1413. 1413 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1414. 1414
  1415. 1415 // Verify that TPA Settable Power is supported.
  1416. 1416 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1417. 1417
  1418. 1418 // Since an LTE carrier is already activated, therefore we can start to check if
  1419. 1419 // SBPS is enabled.
  1420. 1420 logger.addLogStep(SBPS_ENABLED_TEXT + "A");
  1421. 1421 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  1422. 1422 logger.endLogStep();
  1423. 1423
  1424. 1424 // Create TPA device
  1425. 1425 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1426. 1426 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1427. 1427 int currRfPort = RF_PORT_ID_A;
  1428. 1428 int currAxcId = 2;
  1429. 1429 WcdmaCarrier dlWcdmaCarrier = null;
  1430. 1430
  1431. 1431 logger.addLogStep("Modify power on branchA wcdmaCurrierId = " + currCarrierId);
  1432. 1432 ElvisAssert.saveAssertTrue("Modify power on Branch A", setWcdmaTpaModifyPower(AntennaBranchId.A, currTpaId));
  1433. 1433 logger.endLogStep();
  1434. 1434
  1435. 1435 // Setup+activate WCDMA carrier on branch A
  1436. 1436 logger.addLogStep("Setup and activate WCDMA carriers on branch A");
  1437. 1437 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1438. 1438 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  1439. 1439 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1440. 1440 logger.endLogStep();
  1441. 1441
  1442. 1442 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  1443. 1443 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1444. 1444 logger.endLogStep();
  1445. 1445
  1446. 1446 logger.addLogStep("Releasing LTE carrier for branch A");
  1447. 1447 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1448. 1448 logger.endLogStep();
  1449. 1449 sleepSeconds(3);
  1450. 1450
  1451. 1451 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  1452. 1452 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1453. 1453 logger.endLogStep();
  1454. 1454
  1455. 1455 // Release WCDMA carrier
  1456. 1456 logger.addLogStep("Releasing WCDMA carrier");
  1457. 1457 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1458. 1458 logger.endLogStep();
  1459. 1459 sleepSeconds(3);
  1460. 1460
  1461. 1461 logger.addLogStep(" clear baseband configurations ");
  1462. 1462 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  1463. 1463 logger.endLogStep();
  1464. 1464 }
  1465. 1465
  1466. 1466 /**
  1467. 1467 * To verify SbpsSrv logic L+W TC10.
  1468. 1468 * Details:
  1469. 1469 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1470. 1470 * -Setup+activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  1471. 1471 * -Release WCDMA carrier, verify SbpsSrv state
  1472. 1472 * -Release LTE carrier
  1473. 1473 * Migrated Mira TC:
  1474. 1474 * "TX_MOD C3, TC10: L+W, Verify SbpsSrv logic when starting with a WCDMA carrier and ending with an LTE carrier, prio 1"
  1475. 1475 */
  1476. 1476 @Test(enabled = true)
  1477. 1477 @JcatMethod(testTag = "TX_MOD-C3,SBPS-TC10:L+W",
  1478. 1478 testTitle = "Verify SbpsSrv logic when starting with a WCDMA carrier and ending with an LTE carrier.",
  1479. 1479 testReqRef = " ",
  1480. 1480 testPriority = "A")
  1481. 1481 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  1482. 1482 @Run(@If(ratTypeConnection1OneOf = { RatType.LTE_FDD, RatType.WCDMA },
  1483. 1483 supportsRatAllOf = { RatType.WCDMA, RatType.LTE_FDD },
  1484. 1484 numTxBranchesMoreThan = 0,
  1485. 1485 supportSBPS = Bool.TRUE))
  1486. 1486 public void sbpsC3_TC10_LW() {
  1487. 1487 setTestCase("SBPS-TC10:L+W",
  1488. 1488 "Verify SbpsSrv logic when starting with a WCDMA carrier and ending with an LTE carrier, prio A");
  1489. 1489
  1490. 1490 // Get WCDMA CM and connect to the RADIO
  1491. 1491 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1492. 1492 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  1493. 1493 .getCarrierManagement(wcdmaClient);
  1494. 1494
  1495. 1495 ConnSetupUtils.open(wcdmaClient);
  1496. 1496 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1497. 1497
  1498. 1498 // Verify that TPA Settable Power is supported.
  1499. 1499 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1500. 1500
  1501. 1501 // Create TPA device
  1502. 1502 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1503. 1503 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1504. 1504 int currRfPort = RF_PORT_ID_A;
  1505. 1505 int currAxcId = 2;
  1506. 1506 WcdmaCarrier dlWcdmaCarrier = null;
  1507. 1507
  1508. 1508 logger.addLogStep("Modify power on branchA wcdmaCurrierId = " + currCarrierId);
  1509. 1509 ElvisAssert.saveAssertTrue("Modify power on Branch A", setWcdmaTpaModifyPower(AntennaBranchId.A, currTpaId));
  1510. 1510 logger.endLogStep();
  1511. 1511
  1512. 1512 // Setup+activate WCDMA carrier on branch A
  1513. 1513 logger.addLogStep("Setup and activate WCDMA carriers on branch A");
  1514. 1514 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1515. 1515 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  1516. 1516 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1517. 1517 logger.endLogStep();
  1518. 1518
  1519. 1519 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  1520. 1520 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1521. 1521 logger.endLogStep();
  1522. 1522
  1523. 1523 // Setup+activate LTE carrier
  1524. 1524 logger.addLogStep("Setup, create and activate LTE carrier");
  1525. 1525 currCarrierId = 2;
  1526. 1526 currAxcId = 1;
  1527. 1527 dlLteCarrier = createLteTxCarrier(currCarrierId, currRfPort, currAxcId);
  1528. 1528 dlLteCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.LTE_FDD)
  1529. 1529 .get(0)
  1530. 1530 .getTxOperationBandLowEdge()
  1531. 1531 + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  1532. 1532 ElvisAssert.saveAssertNotNull("LTE carrier couldn't be created", dlLteCarrier);
  1533. 1533 ElvisAssert.saveAssertTrue("Setup LTE carrier", msiCarrierManager.setupCarrier(dlLteCarrier));
  1534. 1534 ElvisAssert.saveAssertTrue("Activate LTE carrier", msiCarrierManager.activateCarrier(dlLteCarrier));
  1535. 1535 logger.endLogStep();
  1536. 1536
  1537. 1537 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  1538. 1538 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1539. 1539 logger.endLogStep();
  1540. 1540
  1541. 1541 // Release WCDMA carrier
  1542. 1542 logger.addLogStep("Releasing WCDMA carrier");
  1543. 1543 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1544. 1544 logger.endLogStep();
  1545. 1545 sleepSeconds(3);
  1546. 1546
  1547. 1547 // An LTE carrier is activated, therefore we can start to check if SBPS is enabled.
  1548. 1548 logger.addLogStep(SBPS_ENABLED_TEXT + "A");
  1549. 1549 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  1550. 1550 logger.endLogStep();
  1551. 1551
  1552. 1552 logger.addLogStep("Releasing LTE carrier for branch A");
  1553. 1553 msiCarrierManager.releaseCarrier(dlLteCarrier);
  1554. 1554 logger.endLogStep();
  1555. 1555 sleepSeconds(3);
  1556. 1556
  1557. 1557 logger.addLogStep(" clear baseband configurations ");
  1558. 1558 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  1559. 1559 logger.endLogStep();
  1560. 1560 }
  1561. 1561
  1562. 1562 /**
  1563. 1563 * To verify SbpsSrv logic W+G.
  1564. 1564 * Details:
  1565. 1565 * -Setup GSM carrier (branch A)
  1566. 1566 * -Send subscription request and check that report indication is received
  1567. 1567 * -Activate GSM carrier (branch A)
  1568. 1568 * -Check that report indication is received (if SBPS supports GSM)
  1569. 1569 * -Verify SbpsSrv state
  1570. 1570 * -Setup+activate WCDMA carrier (branch B), verify SbpsSrv state and carrier configuration
  1571. 1571 * -Release WCDMA carrier (branch B)
  1572. 1572 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1573. 1573 * -Check that report indication is received (if SBPS supports GSM)
  1574. 1574 * -Deactivate WCDMA carrier (branch A), verify SbpsSrv state
  1575. 1575 * -Check that report indication is received (if SBPS supports GSM)
  1576. 1576 * -Reactivate WCDMA carrier (branch A), verify SbpsSrv state
  1577. 1577 * -Check that report indication is received (if SBPS supports GSM)
  1578. 1578 * -Deactivate+Release WCDMA carrier (branch A), verify SbpsSrv state
  1579. 1579 * -Check that report indication is received (if SBPS supports GSM)
  1580. 1580 * -Release GSM carrier (branch A), verify SbpsSrv state
  1581. 1581 * Branch B carrier tests are only done if radio supports multiple TX branches.
  1582. 1582 */
  1583. 1583 @Test(enabled = true)
  1584. 1584 @JcatMethod(testTag = "TX_MOD-C5,SBPS-TC1:W+G",
  1585. 1585 testTitle = "Verify SbpsSrv logic when starting and ending with an GSM carrier.",
  1586. 1586 testReqRef = " ",
  1587. 1587 testPriority = "A")
  1588. 1588 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_50 })
  1589. 1589 @Run(@If(ratTypeAllOf = { RatType.GSM, RatType.WCDMA },
  1590. 1590 supportsRatAllOf = { RatType.WCDMA, RatType.GSM },
  1591. 1591 numTxBranchesMoreThan = 0,
  1592. 1592 supportSBPS = Bool.TRUE))
  1593. 1593 public void sbpsC5_TC1_WG() {
  1594. 1594 setTestCase("SBPS-C5-TC1:W+G",
  1595. 1595 "Verify SbpsSrv logic when starting and ending with an GSM carrier, prio A");
  1596. 1596
  1597. 1597 /*
  1598. 1598 * Setup and activate an GSM carrier.
  1599. 1599 * carrierId = 0, port = A, axcId = 1
  1600. 1600 */
  1601. 1601 logger.addLogStep("Setup and create GSM carrier");
  1602. 1602 Carrier dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  1603. 1603 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  1604. 1604 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  1605. 1605 /*
  1606. 1606 * Carrier frequency for GSM is calculated from ARFCN number which needs to be adjusted
  1607. 1607 * accordingly. Minimum ARFCN number used to setup carrier in the low edge of the frequency
  1608. 1608 * band thus needs to be increased in order to setup carrier 2.5 MHz away from the band low
  1609. 1609 * edge as stated above.
  1610. 1610 * Offset used (12) translated into frequency will give 12*200kHz(carrier BW)= 2.4 MHz
  1611. 1611 */
  1612. 1612 dlGsmCarrier.setArfcnMin(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  1613. 1613 .getArfcnRanges().get(0).getArfcnMin() + 12);
  1614. 1614 dlGsmCarrier.setArfcnMax(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  1615. 1615 .getArfcnRanges().get(0).getArfcnMin() + 12);
  1616. 1616 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  1617. 1617 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  1618. 1618 logger.endLogStep();
  1619. 1619
  1620. 1620 logger.addLogStep("Send subscription request and check that report indication is received");
  1621. 1621 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  1622. 1622 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1623. 1623 logger.endLogStep();
  1624. 1624
  1625. 1625 logger.addLogStep("Activate GSM carrier");
  1626. 1626 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  1627. 1627 logger.endLogStep();
  1628. 1628
  1629. 1629 logger.addLogStep(SBPS_TEXT_GSM + "A");
  1630. 1630 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  1631. 1631 logger.endLogStep();
  1632. 1632
  1633. 1633 if (RADIO_SBPS_CAPABLE_GSM) {
  1634. 1634 logger.addLogStep("Check that report indication is received");
  1635. 1635 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1636. 1636 logger.endLogStep();
  1637. 1637 }
  1638. 1638
  1639. 1639 /*
  1640. 1640 * Get WCDMA CM and connect to the RADIO
  1641. 1641 */
  1642. 1642 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1643. 1643 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  1644. 1644 .getCarrierManagement(wcdmaClient);
  1645. 1645
  1646. 1646 ConnSetupUtils.open(wcdmaClient);
  1647. 1647 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1648. 1648
  1649. 1649 /*
  1650. 1650 * Verify that TPA Settable Power is supported
  1651. 1651 */
  1652. 1652 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1653. 1653
  1654. 1654 /*
  1655. 1655 * If radio has more than 1 TX branch we will also setup WCDMA on
  1656. 1656 * branch B, therefore branch B is added to the branchList
  1657. 1657 * Also reverse the branch list since we want to add WCDMA on B and see that
  1658. 1658 * branch A is not affected when setting up WCDMA on branch B.
  1659. 1659 */
  1660. 1660 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  1661. 1661 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  1662. 1662 branchList.add(AntennaBranchId.B);
  1663. 1663 }
  1664. 1664 branchList.add(AntennaBranchId.A);
  1665. 1665 WcdmaCarrier dlWcdmaCarrier = null;
  1666. 1666
  1667. 1667 for (AntennaBranchId currBranch : branchList) {
  1668. 1668
  1669. 1669 int currTpaId = 0;
  1670. 1670 int currCarrierId = 0;
  1671. 1671 int currRfPort = 0;
  1672. 1672 int currAxcId = 0;
  1673. 1673
  1674. 1674 /*
  1675. 1675 * Used rfPort B for branch B and rfPort A for branch A
  1676. 1676 * carrierId = x, rfPort = x
  1677. 1677 */
  1678. 1678 if (currBranch == AntennaBranchId.B) {
  1679. 1679 currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_B;
  1680. 1680 currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 2;
  1681. 1681 currRfPort = RF_PORT_ID_B;
  1682. 1682 currAxcId = 2;
  1683. 1683 } else {
  1684. 1684 currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1685. 1685 currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1686. 1686 currRfPort = RF_PORT_ID_A;
  1687. 1687 currAxcId = 3;
  1688. 1688 }
  1689. 1689
  1690. 1690 logger.addLogStep("Modify power on branch " + currBranch);
  1691. 1691 Assert.assertTrue(setWcdmaTpaModifyPower(currBranch, currTpaId));
  1692. 1692 logger.endLogStep();
  1693. 1693
  1694. 1694 logger.addLogStep("Setup and activate WCDMA carriers on branch " + currBranch);
  1695. 1695 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1696. 1696 Assert.assertNotNull(dlWcdmaCarrier, "WCDMA carrier couldn't be created");
  1697. 1697 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1698. 1698 logger.endLogStep();
  1699. 1699
  1700. 1700 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1701. 1701 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1702. 1702 logger.endLogStep();
  1703. 1703
  1704. 1704 if (currBranch == AntennaBranchId.B) {
  1705. 1705 /* Verify that activation on branch B hasn't affected state on branch A */
  1706. 1706 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1707. 1707 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  1708. 1708 logger.endLogStep();
  1709. 1709
  1710. 1710 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1711. 1711 Assert.assertTrue(releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1712. 1712 logger.endLogStep();
  1713. 1713
  1714. 1714 } else {
  1715. 1715
  1716. 1716 if (RADIO_SBPS_CAPABLE_GSM) {
  1717. 1717 logger.addLogStep("Check that report indication is received");
  1718. 1718 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1719. 1719 logger.endLogStep();
  1720. 1720 }
  1721. 1721
  1722. 1722 logger.addLogStep("Deactivate WCDMA carrier for branch " + currBranch);
  1723. 1723 Assert.assertTrue(wcdmaCarrierManager.deActivateCarrier(dlWcdmaCarrier));
  1724. 1724 logger.endLogStep();
  1725. 1725
  1726. 1726 logger.addLogStep(SBPS_TEXT_GSM + currBranch);
  1727. 1727 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  1728. 1728 logger.endLogStep();
  1729. 1729
  1730. 1730 if (RADIO_SBPS_CAPABLE_GSM) {
  1731. 1731 logger.addLogStep("Check that report indication is received");
  1732. 1732 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1733. 1733 logger.endLogStep();
  1734. 1734 }
  1735. 1735
  1736. 1736 logger.addLogStep("Activate WCDMA carrier for branch " + currBranch);
  1737. 1737 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1738. 1738 logger.endLogStep();
  1739. 1739
  1740. 1740 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1741. 1741 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1742. 1742 logger.endLogStep();
  1743. 1743
  1744. 1744 if (RADIO_SBPS_CAPABLE_GSM) {
  1745. 1745 logger.addLogStep("Check that report indication is received");
  1746. 1746 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1747. 1747 logger.endLogStep();
  1748. 1748 }
  1749. 1749
  1750. 1750 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1751. 1751 Assert.assertTrue(releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1752. 1752 logger.endLogStep();
  1753. 1753
  1754. 1754 logger.addLogStep(SBPS_TEXT_GSM + currBranch);
  1755. 1755 VerifySbps.verifySpbsState(currBranch, SBPS_STATE_GSM);
  1756. 1756 logger.endLogStep();
  1757. 1757
  1758. 1758 if (RADIO_SBPS_CAPABLE_GSM) {
  1759. 1759 logger.addLogStep("Check that report indication is received");
  1760. 1760 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1761. 1761 logger.endLogStep();
  1762. 1762 }
  1763. 1763
  1764. 1764 logger.addLogStep("Releasing GSM carrier for branch " + currBranch);
  1765. 1765 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  1766. 1766 logger.endLogStep();
  1767. 1767
  1768. 1768 logger.addLogStep(SBPS_DISABLED_TEXT + currBranch);
  1769. 1769 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  1770. 1770 logger.endLogStep();
  1771. 1771 }
  1772. 1772 }
  1773. 1773 logger.addLogStep("Clear baseband configurations");
  1774. 1774 WcdmaBasebandConfigurationUtils.getInstance().clearBasebandData(wcdmaClient, dlWcdmaCarrier);
  1775. 1775 logger.endLogStep();
  1776. 1776
  1777. 1777 }
  1778. 1778
  1779. 1779 /**
  1780. 1780 * To verify SbpsSrv logic W+G TC2.
  1781. 1781 * Purpose:
  1782. 1782 * To verify SbpsSrv logic when starting with a WCDMA carrier and ending with a WCDMA carrier.
  1783. 1783 * Details:
  1784. 1784 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1785. 1785 * -Setup GSM carrier (branch B)
  1786. 1786 * -Send subscription request and check that report indication is received
  1787. 1787 * -Activate GSM carrier (branch B)
  1788. 1788 * -Check that report indication is received (if SBPS supports GSM)
  1789. 1789 * -Verify SbpsSrv state
  1790. 1790 * -Release GSM carrier (branch B)
  1791. 1791 * -Setup GSM carrier (branch A)
  1792. 1792 * -Send subscription request and check that report indication is received
  1793. 1793 * -Activate GSM carrier (branch A)
  1794. 1794 * -Deactivate GSM carrier (branch A), verify SbpsSrv state
  1795. 1795 * -Send subscription request and check that report indication is received
  1796. 1796 * -Reactivate GSM carrier (branch A), verify SbpsSrv state
  1797. 1797 * -Deactivate+release GSM carrier (branch A), verify SbpsSrv state
  1798. 1798 * -Release WCDMA carrier
  1799. 1799 * Branch B carrier tests are only done if radio supports multiple tx branches.
  1800. 1800 */
  1801. 1801 @Test(enabled = true)
  1802. 1802 @JcatMethod(testTag = "TX_MOD-C5,SBPS-TC2:W+G",
  1803. 1803 testTitle = "Verify SbpsSrv logic when starting and ending with a WCDMA carrier.",
  1804. 1804 testReqRef = " ",
  1805. 1805 testPriority = "A")
  1806. 1806 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  1807. 1807 @Run(@If(ratTypeConnection1OneOf = { RatType.GSM, RatType.WCDMA },
  1808. 1808 supportsRatAllOf = { RatType.WCDMA, RatType.GSM },
  1809. 1809 numTxBranchesMoreThan = 0,
  1810. 1810 supportSBPS = Bool.TRUE))
  1811. 1811 public void sbpsC5_TC2_WG() {
  1812. 1812 setTestCase("SBPS-C5-TC2:W+G",
  1813. 1813 "Verify SbpsSrv logic when starting and ending with a WCDMA carrier, prio A");
  1814. 1814
  1815. 1815 // Get WCDMA CM and connect to the RADIO
  1816. 1816 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  1817. 1817 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory.getCarrierManagement(wcdmaClient);
  1818. 1818
  1819. 1819 ConnSetupUtils.open(wcdmaClient);
  1820. 1820 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  1821. 1821
  1822. 1822 // Verify that TPA Settable Power is supported.
  1823. 1823 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  1824. 1824
  1825. 1825 // Create TPA device
  1826. 1826 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  1827. 1827 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  1828. 1828 int currRfPort = RF_PORT_ID_A;
  1829. 1829 int currAxcId = 2;
  1830. 1830 WcdmaCarrier dlWcdmaCarrier = null;
  1831. 1831 AntennaBranchId wcdmaBranch = AntennaBranchId.A;
  1832. 1832
  1833. 1833 logger.addLogStep("Modify power on branch " + wcdmaBranch + "wcdmaCurrierId = " + currCarrierId);
  1834. 1834 ElvisAssert.saveAssertTrue("Modify power on wcdmaBranch", setWcdmaTpaModifyPower(wcdmaBranch, currTpaId));
  1835. 1835 logger.endLogStep();
  1836. 1836
  1837. 1837 // Setup+activate WCDMA carrier on branch A
  1838. 1838 logger.addLogStep("Setup and activate WCDMA carriers on branch " + wcdmaBranch);
  1839. 1839 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  1840. 1840 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  1841. 1841 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  1842. 1842 logger.endLogStep();
  1843. 1843
  1844. 1844 logger.addLogStep(SBPS_DISABLED_TEXT + wcdmaBranch);
  1845. 1845 VerifySbps.verifySpbsState(wcdmaBranch, SBPSState.DISABLED);
  1846. 1846 logger.endLogStep();
  1847. 1847
  1848. 1848 // If radio has more than 1 TX branch we will also setup GSM on branch B,
  1849. 1849 // therefore branch B is added to the branchList
  1850. 1850 // Also reverse the branch list since we want to add GSM on B and see that
  1851. 1851 // branch A is not affected when setting up GSM on branch B.
  1852. 1852 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  1853. 1853 if (StaticInfo.getInstance().getRuInfo().getRu().getTxBranches() > 1) {
  1854. 1854 branchList.add(AntennaBranchId.B);
  1855. 1855 }
  1856. 1856 branchList.add(AntennaBranchId.A);
  1857. 1857
  1858. 1858 // Reverse to perform branch B test first (if radio supports multiple tx)
  1859. 1859 for (AntennaBranchId currBranch : branchList) {
  1860. 1860
  1861. 1861 currAxcId = 1;
  1862. 1862 if (currBranch == AntennaBranchId.B) {
  1863. 1863 currRfPort = RF_PORT_ID_B;
  1864. 1864 currCarrierId = 2;
  1865. 1865 } else {
  1866. 1866 currRfPort = RF_PORT_ID_A;
  1867. 1867 currCarrierId = 3;
  1868. 1868 }
  1869. 1869
  1870. 1870 // Setup+activate GSM carrier
  1871. 1871 logger.addLogStep("Setup and create GSM carrier");
  1872. 1872 Carrier dlGsmCarrier = createGsmTxCarrier(currCarrierId, currRfPort, currAxcId);
  1873. 1873 ElvisAssert.saveAssertNotNull("GSM carrier couldn't be created", dlGsmCarrier);
  1874. 1874 ElvisAssert.saveAssertTrue("Setup GSM carrier", msiCarrierManager.setupCarrier(dlGsmCarrier));
  1875. 1875 logger.endLogStep();
  1876. 1876
  1877. 1877 logger.addLogStep("Send subscription request and check that report indication is received");
  1878. 1878 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  1879. 1879 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1880. 1880 logger.endLogStep();
  1881. 1881
  1882. 1882 logger.addLogStep("Activate GSM carrier");
  1883. 1883 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  1884. 1884 logger.endLogStep();
  1885. 1885
  1886. 1886 if (currBranch == AntennaBranchId.B) {
  1887. 1887
  1888. 1888 logger.addLogStep(SBPS_TEXT_GSM + currBranch);
  1889. 1889 VerifySbps.verifySpbsState(AntennaBranchId.B, SBPS_STATE_GSM);
  1890. 1890 logger.endLogStep();
  1891. 1891
  1892. 1892 if (RADIO_SBPS_CAPABLE_GSM) {
  1893. 1893 logger.addLogStep("Check that report indication is received");
  1894. 1894 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  1895. 1895 logger.endLogStep();
  1896. 1896 }
  1897. 1897
  1898. 1898 // Verify that activation on branch B hasn't affected state on branch A
  1899. 1899 logger.addLogStep(SBPS_AFFECTED_TEXT);
  1900. 1900 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1901. 1901 logger.endLogStep();
  1902. 1902
  1903. 1903 // Release GSM carrier on branch B
  1904. 1904 logger.addLogStep("Releasing GSM carrier for branch " + currBranch);
  1905. 1905 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  1906. 1906 logger.endLogStep();
  1907. 1907
  1908. 1908 logger.addLogStep(SBPS_DISABLED_TEXT + "B");
  1909. 1909 VerifySbps.verifySpbsState(AntennaBranchId.B, SBPSState.DISABLED);
  1910. 1910 logger.endLogStep();
  1911. 1911
  1912. 1912 } else {
  1913. 1913
  1914. 1914 logger.addLogStep(SBPS_DISABLED_TEXT + "A");
  1915. 1915 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1916. 1916 logger.endLogStep();
  1917. 1917
  1918. 1918 // Deactivate GSM carrier
  1919. 1919 logger.addLogStep("Deactivate GSM carrier for branch " + currBranch);
  1920. 1920 msiCarrierManager.deActivateCarrier(dlGsmCarrier);
  1921. 1921 logger.endLogStep();
  1922. 1922
  1923. 1923 logger.addLogStep(SBPS_DISABLED_TEXT + "A");
  1924. 1924 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1925. 1925 logger.endLogStep();
  1926. 1926
  1927. 1927 logger.addLogStep("Send subscription request and check that report indication is received");
  1928. 1928 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  1929. 1929 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  1930. 1930 logger.endLogStep();
  1931. 1931
  1932. 1932 // Reactivate GSM carrier
  1933. 1933 logger.addLogStep("Reactivate GSM carrier for branch " + currBranch);
  1934. 1934 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  1935. 1935 logger.endLogStep();
  1936. 1936
  1937. 1937 logger.addLogStep(SBPS_DISABLED_TEXT + "A");
  1938. 1938 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1939. 1939 logger.endLogStep();
  1940. 1940
  1941. 1941 // Deactivate+release GSM carrier
  1942. 1942 logger.addLogStep("Deactivate GSM carrier for branch " + currBranch);
  1943. 1943 msiCarrierManager.deActivateCarrier(dlGsmCarrier);
  1944. 1944 logger.endLogStep();
  1945. 1945
  1946. 1946 logger.addLogStep("Releasing GSM carrier for branch " + currBranch);
  1947. 1947 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  1948. 1948 logger.endLogStep();
  1949. 1949 sleepSeconds(5);
  1950. 1950
  1951. 1951 logger.addLogStep(SBPS_DISABLED_TEXT + "A");
  1952. 1952 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1953. 1953 logger.endLogStep();
  1954. 1954
  1955. 1955 // Release WCDMA carrier
  1956. 1956 logger.addLogStep("Releasing WCDMA carrier for branch " + currBranch);
  1957. 1957 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  1958. 1958 logger.endLogStep();
  1959. 1959
  1960. 1960 logger.addLogStep(SBPS_DISABLED_TEXT + "A");
  1961. 1961 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  1962. 1962 logger.endLogStep();
  1963. 1963
  1964. 1964 }
  1965. 1965 }
  1966. 1966
  1967. 1967 logger.addLogStep("Clear baseband configurations");
  1968. 1968 WcdmaBasebandConfigurationUtils.getInstance().clearBasebandData(wcdmaClient, dlWcdmaCarrier);
  1969. 1969 logger.endLogStep();
  1970. 1970 }
  1971. 1971
  1972. 1972 /**
  1973. 1973 * To verify SbpsSrv logic W+G TC3.
  1974. 1974 * Details:
  1975. 1975 * -Setup GSM carrier (branch A)
  1976. 1976 * -Send subscription request and check that report indication is received
  1977. 1977 * -Activate GSM carrier (branch A)
  1978. 1978 * -Check that report indication is received (if SBPS supports GSM)
  1979. 1979 * -Verify SbpsSrv state
  1980. 1980 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  1981. 1981 * -Check that report indication is received (if SBPS supports GSM)
  1982. 1982 * -Release GSM carrier, verify SbpsSrv state
  1983. 1983 * -Release WCDMA carrier
  1984. 1984 */
  1985. 1985 @Test(enabled = true)
  1986. 1986 @JcatMethod(testTag = "TX_MOD-C5,SBPS-TC3:W+G",
  1987. 1987 testTitle = "Verify SbpsSrv logic when starting with an GSM carrier and ending with a WCDMA carrier.",
  1988. 1988 testReqRef = " ",
  1989. 1989 testPriority = "A")
  1990. 1990 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  1991. 1991 @Run(@If(ratTypeConnection1OneOf = { RatType.GSM, RatType.WCDMA },
  1992. 1992 supportsRatAllOf = { RatType.WCDMA, RatType.GSM },
  1993. 1993 numTxBranchesMoreThan = 0,
  1994. 1994 supportSBPS = Bool.TRUE))
  1995. 1995 public void sbpsC5_TC3_WG() {
  1996. 1996 setTestCase("SBPS-C5-TC3:W+G",
  1997. 1997 "Verify SbpsSrv logic when starting with an GSM carrier and ending with a WCDMA carrier, prio A");
  1998. 1998
  1999. 1999 /*
  2000. 2000 * Setup and activate an GSM carrier.
  2001. 2001 * carrierId = 0, port = A, axcId = 1
  2002. 2002 */
  2003. 2003 logger.addLogStep("Setup and create GSM carrier");
  2004. 2004 Carrier dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  2005. 2005 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  2006. 2006 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  2007. 2007 /*
  2008. 2008 * Carrier frequency for GSM is calculated from ARFCN number which needs to be adjusted
  2009. 2009 * accordingly. Minimum ARFCN number used to setup carrier in the low edge of the frequency
  2010. 2010 * band thus needs to be increased in order to setup carrier 2.5 MHz away from the band low
  2011. 2011 * edge as stated above.
  2012. 2012 * Offset used (12) translated into frequency will give 12*200kHz(carrier BW)= 2.4 MHz
  2013. 2013 */
  2014. 2014 dlGsmCarrier.setArfcnMin(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  2015. 2015 .getArfcnRanges().get(0).getArfcnMin() + 12);
  2016. 2016 dlGsmCarrier.setArfcnMax(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  2017. 2017 .getArfcnRanges().get(0).getArfcnMin() + 12);
  2018. 2018 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  2019. 2019 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  2020. 2020 logger.endLogStep();
  2021. 2021
  2022. 2022 logger.addLogStep("Send subscription request and check that report indication is received");
  2023. 2023 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  2024. 2024 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2025. 2025 logger.endLogStep();
  2026. 2026
  2027. 2027 logger.addLogStep("Activate GSM carrier");
  2028. 2028 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  2029. 2029 logger.endLogStep();
  2030. 2030
  2031. 2031 logger.addLogStep(SBPS_TEXT_GSM + "A");
  2032. 2032 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  2033. 2033 logger.endLogStep();
  2034. 2034
  2035. 2035 if (RADIO_SBPS_CAPABLE_GSM) {
  2036. 2036 logger.addLogStep("Check that report indication is received");
  2037. 2037 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2038. 2038 logger.endLogStep();
  2039. 2039 }
  2040. 2040
  2041. 2041 // Get WCDMA CM and connect to the RADIO
  2042. 2042 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  2043. 2043 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  2044. 2044 .getCarrierManagement(wcdmaClient);
  2045. 2045
  2046. 2046 ConnSetupUtils.open(wcdmaClient);
  2047. 2047 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  2048. 2048
  2049. 2049 // Verify that TPA Settable Power is supported.
  2050. 2050 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  2051. 2051
  2052. 2052 // Create TPA device
  2053. 2053 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  2054. 2054 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  2055. 2055 int currRfPort = RF_PORT_ID_A;
  2056. 2056 int currAxcId = 2;
  2057. 2057 WcdmaCarrier dlWcdmaCarrier = null;
  2058. 2058
  2059. 2059 logger.addLogStep("Modify power on branchA wcdmaCurrierId = " + currCarrierId);
  2060. 2060 ElvisAssert.saveAssertTrue("Modify power on Branch A", setWcdmaTpaModifyPower(AntennaBranchId.A, currTpaId));
  2061. 2061 logger.endLogStep();
  2062. 2062
  2063. 2063 // Setup+activate WCDMA carrier on branch A
  2064. 2064 logger.addLogStep("Setup and activate WCDMA carriers on branch A");
  2065. 2065 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  2066. 2066 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  2067. 2067 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  2068. 2068 logger.endLogStep();
  2069. 2069
  2070. 2070 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2071. 2071 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2072. 2072 logger.endLogStep();
  2073. 2073
  2074. 2074 if (RADIO_SBPS_CAPABLE_GSM) {
  2075. 2075 logger.addLogStep("Check that report indication is received");
  2076. 2076 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2077. 2077 logger.endLogStep();
  2078. 2078 }
  2079. 2079
  2080. 2080 logger.addLogStep("Releasing GSM carrier for branch A");
  2081. 2081 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  2082. 2082 logger.endLogStep();
  2083. 2083
  2084. 2084 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2085. 2085 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2086. 2086 logger.endLogStep();
  2087. 2087
  2088. 2088 // Release WCDMA carrier
  2089. 2089 logger.addLogStep("Releasing WCDMA carrier");
  2090. 2090 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  2091. 2091 logger.endLogStep();
  2092. 2092
  2093. 2093 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2094. 2094 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2095. 2095 logger.endLogStep();
  2096. 2096
  2097. 2097 logger.addLogStep("Clear baseband configurations");
  2098. 2098 WcdmaBasebandConfigurationUtils.getInstance().clearBasebandData(wcdmaClient, dlWcdmaCarrier);
  2099. 2099 logger.endLogStep();
  2100. 2100 }
  2101. 2101
  2102. 2102 /**
  2103. 2103 * To verify SbpsSrv logic W+G TC4.
  2104. 2104 * Details:
  2105. 2105 * -Setup+activate WCDMA carrier (branch A), verify SbpsSrv state and carrier configuration
  2106. 2106 * -Setup GSM carrier (branch A)
  2107. 2107 * -Send subscription request and check that report indication is received
  2108. 2108 * -Activate GSM carrier (branch A)
  2109. 2109 * -Verify SbpsSrv state
  2110. 2110 * -Release WCDMA carrier, verify SbpsSrv state
  2111. 2111 * -Check that report indication is received (if SBPS supports GSM)
  2112. 2112 * -Release GSM carrier
  2113. 2113 */
  2114. 2114 @Test(enabled = true)
  2115. 2115 @JcatMethod(testTag = "TX_MOD-C5,SBPS-TC4:W+G",
  2116. 2116 testTitle = "Verify SbpsSrv logic when starting with a WCDMA carrier and ending with an GSM carrier.",
  2117. 2117 testReqRef = " ",
  2118. 2118 testPriority = "A")
  2119. 2119 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2120. 2120 @Run(@If(ratTypeConnection1OneOf = { RatType.GSM, RatType.WCDMA },
  2121. 2121 supportsRatAllOf = { RatType.WCDMA, RatType.GSM },
  2122. 2122 numTxBranchesMoreThan = 0,
  2123. 2123 supportSBPS = Bool.TRUE))
  2124. 2124 public void sbpsC5_TC4_WG() {
  2125. 2125 setTestCase("SBPS-C5-TC4:W+G",
  2126. 2126 "Verify SbpsSrv logic when starting with a WCDMA carrier and ending with an GSM carrier, prio A");
  2127. 2127
  2128. 2128 // Get WCDMA CM and connect to the RADIO
  2129. 2129 wcdmaClient = stp.defaultDigitalUnit().getWcdmaClient();
  2130. 2130 wcdmaCarrierManager = (WcdmaCarrierManagement) CarrierManagementFactory
  2131. 2131 .getCarrierManagement(wcdmaClient);
  2132. 2132
  2133. 2133 ConnSetupUtils.open(wcdmaClient);
  2134. 2134 ConnSetupUtils.openTpa(wcdmaClient, new UserOptions());
  2135. 2135
  2136. 2136 // Verify that TPA Settable Power is supported.
  2137. 2137 VerifyTxModule.verifyTpaSettablePowerSupportedInAllBranches(wcdmaClient);
  2138. 2138
  2139. 2139 // Create TPA device
  2140. 2140 int currTpaId = WcdmaDuClient.IdOffset.TPA_ID_OFFSET.getValue() + TPA_ID_ADD_FOR_BRANCH_A;
  2141. 2141 int currCarrierId = WcdmaDuClient.IdOffset.TR_ID_OFFSET.getValue() + 1;
  2142. 2142 int currRfPort = RF_PORT_ID_A;
  2143. 2143 int currAxcId = 2;
  2144. 2144 WcdmaCarrier dlWcdmaCarrier = null;
  2145. 2145
  2146. 2146 logger.addLogStep("Modify power on branchA wcdmaCurrierId = " + currCarrierId);
  2147. 2147 ElvisAssert.saveAssertTrue("Modify power on Branch A", setWcdmaTpaModifyPower(AntennaBranchId.A, currTpaId));
  2148. 2148 logger.endLogStep();
  2149. 2149
  2150. 2150 // Setup+activate WCDMA carrier on branch A
  2151. 2151 logger.addLogStep("Setup and activate WCDMA carriers on branch A");
  2152. 2152 dlWcdmaCarrier = createAndSetupWcdmaTxCarrier(currCarrierId, currRfPort, currAxcId);
  2153. 2153 ElvisAssert.saveAssertNotNull("WCDMA carrier couldn't be created", dlWcdmaCarrier);
  2154. 2154 VerifyCarrierControl.verifyActivateAndActivated(dlWcdmaCarrier, wcdmaCarrierManager);
  2155. 2155 logger.endLogStep();
  2156. 2156
  2157. 2157 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2158. 2158 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2159. 2159 logger.endLogStep();
  2160. 2160
  2161. 2161 // Setup GSM carrier
  2162. 2162 logger.addLogStep("Setup and create GSM carrier");
  2163. 2163 currCarrierId = 2;
  2164. 2164 currAxcId = 1;
  2165. 2165 Carrier dlGsmCarrier = createGsmTxCarrier(currCarrierId, currRfPort, currAxcId);
  2166. 2166 ElvisAssert.saveAssertNotNull("GSM carrier couldn't be created", dlGsmCarrier);
  2167. 2167 ElvisAssert.saveAssertTrue("Setup GSM carrier", msiCarrierManager.setupCarrier(dlGsmCarrier));
  2168. 2168 logger.endLogStep();
  2169. 2169
  2170. 2170 logger.addLogStep("Send subscription request and check that report indication is received");
  2171. 2171 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  2172. 2172 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2173. 2173 logger.endLogStep();
  2174. 2174
  2175. 2175 logger.addLogStep("Activate GSM carrier");
  2176. 2176 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  2177. 2177 logger.endLogStep();
  2178. 2178
  2179. 2179 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2180. 2180 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2181. 2181 logger.endLogStep();
  2182. 2182
  2183. 2183 // Release WCDMA carrier
  2184. 2184 logger.addLogStep("Releasing WCDMA carrier");
  2185. 2185 ElvisAssert.saveAssertTrue("Releasing WCDMA carrier", releaseWcdmaCarrier(dlWcdmaCarrier, currTpaId));
  2186. 2186 logger.endLogStep();
  2187. 2187
  2188. 2188 // Since a GSM carrier is activated we can check SBPS state
  2189. 2189 logger.addLogStep(SBPS_TEXT_GSM + "A");
  2190. 2190 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  2191. 2191 logger.endLogStep();
  2192. 2192
  2193. 2193 if (RADIO_SBPS_CAPABLE_GSM) {
  2194. 2194 logger.addLogStep("Check that report indication is received");
  2195. 2195 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2196. 2196 logger.endLogStep();
  2197. 2197 }
  2198. 2198
  2199. 2199 logger.addLogStep("Releasing GSM carrier for branch A");
  2200. 2200 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  2201. 2201 logger.endLogStep();
  2202. 2202
  2203. 2203 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2204. 2204 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2205. 2205 logger.endLogStep();
  2206. 2206
  2207. 2207 logger.addLogStep("Clear baseband configurations");
  2208. 2208 WcdmaBasebandConfigurationUtils.getInstance().clearBasebandData(wcdmaClient, dlWcdmaCarrier);
  2209. 2209 logger.endLogStep();
  2210. 2210 }
  2211. 2211
  2212. 2212 /**
  2213. 2213 * To Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer
  2214. 2214 * expires
  2215. 2215 * Details:
  2216. 2216 * - Change minimum timer value (through db or cmd) 3s
  2217. 2217 * - Setup + activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  2218. 2218 * - Raise SBPS failed event using the injection tool after minimum timer expires
  2219. 2219 * - Check SBPS is disabled for the period set (3s)
  2220. 2220 * - SBPS should be restarted after minimum timer expires (SBPS enabled)
  2221. 2221 * - Disable and release the carrier
  2222. 2222 * - Reset timers and limits to default
  2223. 2223 * Migrated Mira TC:
  2224. 2224 * "TX_MOD C2, TC1: LTE, RU does not restart SBPS after fault is raised from TXL before the minimum timer expires, prio 2"
  2225. 2225 */
  2226. 2226 @Test(enabled = true)
  2227. 2227 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC1:L",
  2228. 2228 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer expires",
  2229. 2229 testReqRef = " ",
  2230. 2230 testPriority = "B")
  2231. 2231 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2232. 2232 @Exclude(@If(platformIs = RadioPlatform.PL4))
  2233. 2233 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD },
  2234. 2234 supportsRatAllOf = { RatType.LTE_FDD },
  2235. 2235 numTxBranchesMoreThan = 0,
  2236. 2236 supportSBPS = Bool.TRUE))
  2237. 2237 public void sbpsC2_TC1_L() {
  2238. 2238 setTestCase(
  2239. 2239 "SBPS-C2-TC1:L",
  2240. 2240 "Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer expires, prio B");
  2241. 2241
  2242. 2242 final int highTrafficLevel = 200;
  2243. 2243
  2244. 2244 // Change counter values (recovery time 3s)
  2245. 2245 logger.addLogStep("Step 1: Change the counter values");
  2246. 2246 radioUnit.coli().txm().sbps().modifyDelay(
  2247. 2247 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2248. 2248 logger.endLogStep();
  2249. 2249
  2250. 2250 radioUnit.coli().elog().clear();
  2251. 2251
  2252. 2252 // Setup LTE carrier
  2253. 2253 logger.addLogStep("Step 2: Setup and create LTE carrier");
  2254. 2254 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  2255. 2255 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2256. 2256 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2257. 2257 logger.endLogStep();
  2258. 2258
  2259. 2259 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  2260. 2260 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2261. 2261 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2262. 2262 logger.endLogStep();
  2263. 2263
  2264. 2264 logger.addLogStep("Step 4: Activate LTE carrier");
  2265. 2265 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2266. 2266 logger.endLogStep();
  2267. 2267
  2268. 2268 // Check if SBPS is enabled
  2269. 2269 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2270. 2270 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2271. 2271 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2272. 2272 logger.endLogStep();
  2273. 2273
  2274. 2274 // Raise SBPS failed event
  2275. 2275 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  2276. 2276 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2277. 2277 logger.endLogStep();
  2278. 2278
  2279. 2279 // SBPS is disabled
  2280. 2280 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2281. 2281
  2282. 2282 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2283. 2283 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2284. 2284
  2285. 2285 ElvisAssert.assertEquals(true,
  2286. 2286 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  2287. 2287 logger.endLogStep();
  2288. 2288
  2289. 2289 // Wait until recovery time expires
  2290. 2290 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2291. 2291
  2292. 2292 // SBPS is enabled after recovery time expired
  2293. 2293 logger.addLogStep("Step 8: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2294. 2294 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2295. 2295 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2296. 2296 ElvisAssert.assertEquals(true,
  2297. 2297 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_RECOVERED_TEXT));
  2298. 2298 logger.endLogStep();
  2299. 2299
  2300. 2300 // Release the LTE carrier.
  2301. 2301 logger.addLogStep("Step 9: Release the LTE carrier");
  2302. 2302 msiCarrierManager.releaseCarrier(dlLteCarrier);
  2303. 2303 logger.endLogStep();
  2304. 2304
  2305. 2305 sleepSeconds(2);
  2306. 2306
  2307. 2307 // Reset counter values
  2308. 2308 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  2309. 2309 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  2310. 2310 }
  2311. 2311
  2312. 2312 /**
  2313. 2313 * To Verify RU does not restart SBPS after fault is raised from TXL if the maximum
  2314. 2314 * daily restart count has been reached within daily sliding window
  2315. 2315 * Details:
  2316. 2316 * - Change counter values (2 restarts and 3s)
  2317. 2317 * - Setup + activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  2318. 2318 * 1- Raise SBPS failed event using the injection tool after minimum timer expires
  2319. 2319 * 2- Check SBPS is disabled for the period set (3s)
  2320. 2320 * 3- SBPS should be restarted after minimum timer expires (SBPS enabled)
  2321. 2321 * - Do steps 1-3 until maximum daily restart count (2) has been reached within daily sliding
  2322. 2322 * window
  2323. 2323 * - Raise SBPS failed event using the injection tool
  2324. 2324 * - Wait 3s
  2325. 2325 * - SBPS should not be restarted (Disabled)
  2326. 2326 * - Disable and release the carrier
  2327. 2327 * - Reset timers and limits to default
  2328. 2328 * Migrated Mira TC:
  2329. 2329 * "TX_MOD C2, TC2: LTE, Verify RU does not restart SBPS after fault is raised from TXL if the
  2330. 2330 * maximum daily restart count has been reached within daily sliding window, prio 2"
  2331. 2331 */
  2332. 2332 @Test(enabled = true)
  2333. 2333 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC2:L",
  2334. 2334 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL if the maximum daily restart count has been reached within daily sliding window",
  2335. 2335 testReqRef = " ",
  2336. 2336 testPriority = "B")
  2337. 2337 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2338. 2338 @Exclude(@If(platformIs = RadioPlatform.PL4))
  2339. 2339 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD },
  2340. 2340 supportsRatAllOf = { RatType.LTE_FDD },
  2341. 2341 numTxBranchesMoreThan = 0,
  2342. 2342 supportSBPS = Bool.TRUE))
  2343. 2343 public void sbpsC2_TC2_L() {
  2344. 2344 setTestCase(
  2345. 2345 "SBPS-C2-TC2:L",
  2346. 2346 "Verify RU does not restart SBPS after fault is raised from TXL if the maximum daily restart count has been reached within daily sliding window, prio B");
  2347. 2347
  2348. 2348 final int highTrafficLevel = 200;
  2349. 2349 final int weeklyRestartCount = 3;
  2350. 2350 final int weeklyWindowSize = DAILY_WINDOW_SIZE * 8; // 128 s
  2351. 2351 final int dailyRestartCount = 2;
  2352. 2352 final int dailyWindowSize = DAILY_WINDOW_SIZE * 4; // 64 s
  2353. 2353
  2354. 2354 // Change counter values (2 restarts and 3s)
  2355. 2355 logger.addLogStep("Step 1: Change the counter values");
  2356. 2356 radioUnit.coli().txm().sbps().modifyDelay(
  2357. 2357 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2358. 2358 radioUnit.coli().txm().sbps().modifySlidingWindowLimits(
  2359. 2359 AntennaBranchId.A, weeklyRestartCount, weeklyWindowSize, dailyRestartCount, dailyWindowSize);
  2360. 2360 logger.endLogStep();
  2361. 2361
  2362. 2362 radioUnit.coli().elog().clear();
  2363. 2363
  2364. 2364 // Setup LTE carrier
  2365. 2365 logger.addLogStep("Step 2: Setup and create LTE carrier");
  2366. 2366 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  2367. 2367 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2368. 2368 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2369. 2369 logger.endLogStep();
  2370. 2370
  2371. 2371 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  2372. 2372 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2373. 2373 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2374. 2374 logger.endLogStep();
  2375. 2375
  2376. 2376 logger.addLogStep("Step 4: Activate LTE carrier");
  2377. 2377 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2378. 2378 logger.endLogStep();
  2379. 2379
  2380. 2380 // Check if SBPS is enabled
  2381. 2381 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2382. 2382 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2383. 2383 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2384. 2384 logger.endLogStep();
  2385. 2385
  2386. 2386 for (int dailyCount = 0; dailyCount < dailyRestartCount; ++dailyCount) {
  2387. 2387 radioUnit.coli().elog().clear();
  2388. 2388
  2389. 2389 // Raise SBPS failed event
  2390. 2390 logger.addLogStep("Raise SBPS failed event using the injection tool");
  2391. 2391 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2392. 2392 logger.endLogStep();
  2393. 2393
  2394. 2394 sleepMilliseconds(SLEEP_TIME);
  2395. 2395
  2396. 2396 // SBPS is disabled
  2397. 2397 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2398. 2398 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2399. 2399 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2400. 2400 ElvisAssert.assertEquals(true,
  2401. 2401 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  2402. 2402 logger.endLogStep();
  2403. 2403
  2404. 2404 // Wait until recovery time expires
  2405. 2405 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2406. 2406
  2407. 2407 // SBPS is enabled after recovery time expired
  2408. 2408 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2409. 2409 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2410. 2410 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2411. 2411 ElvisAssert.assertEquals(true,
  2412. 2412 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_RECOVERED_TEXT));
  2413. 2413 logger.endLogStep();
  2414. 2414 }
  2415. 2415
  2416. 2416 radioUnit.coli().elog().clear();
  2417. 2417
  2418. 2418 // Raise SBPS failed event
  2419. 2419 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  2420. 2420 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2421. 2421 logger.endLogStep();
  2422. 2422
  2423. 2423 sleepMilliseconds(SLEEP_TIME);
  2424. 2424
  2425. 2425 // SBPS is disabled
  2426. 2426 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2427. 2427 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2428. 2428 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2429. 2429 ElvisAssert.assertEquals(true,
  2430. 2430 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  2431. 2431 logger.endLogStep();
  2432. 2432
  2433. 2433 radioUnit.coli().elog().clear();
  2434. 2434
  2435. 2435 // Wait until recovery time expires
  2436. 2436 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2437. 2437
  2438. 2438 // RU does not restart because of daily count = 3 and Sbps is still in temporarily disabled state
  2439. 2439 logger.addLogStep("Step 8:" + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2440. 2440 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2441. 2441 logger.endLogStep();
  2442. 2442
  2443. 2443 // Release the LTE carrier.
  2444. 2444 logger.addLogStep("Step 9: Release the LTE carrier");
  2445. 2445 msiCarrierManager.releaseCarrier(dlLteCarrier);
  2446. 2446 logger.endLogStep();
  2447. 2447
  2448. 2448 // Reset counter values
  2449. 2449 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  2450. 2450 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  2451. 2451 }
  2452. 2452
  2453. 2453 /**
  2454. 2454 * To Verify RU does not restart SBPS after fault is raised from TXL if the total
  2455. 2455 * maximum restart count has been reached within weekly sliding window
  2456. 2456 * Details:
  2457. 2457 * - Change counter values (through db or cmd) (1 daily, 2 Weekly, 10s, 20s (daily),
  2458. 2458 * 30s(weekly))
  2459. 2459 * - Setup + activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  2460. 2460 * 1- Raise SBPS failed event using the injection tool after minimum timer expires
  2461. 2461 * 2- Check SBPS is disabled for the period set (3s)
  2462. 2462 * 3- SBPS should be restarted after minimum timer expires (SBPS enabled)
  2463. 2463 * - Do steps 1-3 until maximum daily restart count (2) has been reached within daily sliding
  2464. 2464 * window
  2465. 2465 * - Check SBPS is re-enabled
  2466. 2466 * - Raise SBPS failed event using the injection tool
  2467. 2467 * - Wait 1 day passes (21s)
  2468. 2468 * - SBPS should be restarted (Enabled)
  2469. 2469 * - Raise SBPS failed event using the injection tool
  2470. 2470 * - Check SBPS is disabled
  2471. 2471 * - Wait 11s
  2472. 2472 * - SBPS should not be restarted (disabled)
  2473. 2473 * - Wait 1 week passes (31s)
  2474. 2474 * - Check SBPS is re-enabled
  2475. 2475 * - Disable and release the carrier
  2476. 2476 * - Reset timers and limits to default
  2477. 2477 * Migrated Mira TC:
  2478. 2478 * "TX_MOD C2, TC3: LTE, Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window, prio 2"
  2479. 2479 */
  2480. 2480 @Test(enabled = true)
  2481. 2481 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC3:L",
  2482. 2482 testTitle = "Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window",
  2483. 2483 testReqRef = " ",
  2484. 2484 testPriority = "B")
  2485. 2485 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2486. 2486 @Exclude(@If(platformIs = RadioPlatform.PL4))
  2487. 2487 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD },
  2488. 2488 supportsRatAllOf = { RatType.LTE_FDD },
  2489. 2489 numTxBranchesMoreThan = 0,
  2490. 2490 supportSBPS = Bool.TRUE))
  2491. 2491 public void sbpsC2_TC3_L() {
  2492. 2492 setTestCase(
  2493. 2493 "SBPS-C2-TC3:L",
  2494. 2494 "Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window, prio B");
  2495. 2495
  2496. 2496 final int highTrafficLevel = 200;
  2497. 2497 final int weeklyRestartCount = 2;
  2498. 2498 final int weeklyWindowSize = 20; // 20 s
  2499. 2499 final int dailyRestartCount = 1;
  2500. 2500 final int dailyWindowSize = 10; // 10 s
  2501. 2501
  2502. 2502 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2503. 2503
  2504. 2504 // Change counter values (2 weekly restarts and 20s; 1 daily restart and 10s)
  2505. 2505 logger.addLogStep("Step 1: Change the counter values");
  2506. 2506 radioUnit.coli().txm().sbps().modifyDelay(
  2507. 2507 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2508. 2508 radioUnit.coli().txm().sbps().modifySlidingWindowLimits(
  2509. 2509 AntennaBranchId.A, weeklyRestartCount, weeklyWindowSize, dailyRestartCount, dailyWindowSize);
  2510. 2510 logger.endLogStep();
  2511. 2511
  2512. 2512 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2513. 2513
  2514. 2514 radioUnit.coli().elog().clear();
  2515. 2515
  2516. 2516 // Setup LTE carrier
  2517. 2517 logger.addLogStep("Step 2: Setup and create LTE carrier");
  2518. 2518 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  2519. 2519 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2520. 2520 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2521. 2521 logger.endLogStep();
  2522. 2522
  2523. 2523 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  2524. 2524 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2525. 2525 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2526. 2526 logger.endLogStep();
  2527. 2527
  2528. 2528 logger.addLogStep("Step 4: Activate LTE carrier");
  2529. 2529 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2530. 2530 logger.endLogStep();
  2531. 2531
  2532. 2532 // Check if SBPS is enabled
  2533. 2533 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2534. 2534 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2535. 2535 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2536. 2536 logger.endLogStep();
  2537. 2537
  2538. 2538 // Verify daily recovery
  2539. 2539 for (int dailyCount = 0; dailyCount < dailyRestartCount; ++dailyCount) {
  2540. 2540
  2541. 2541 // Raise SBPS failed event
  2542. 2542 logger.addLogStep("Raise SBPS failed event using the injection tool");
  2543. 2543 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2544. 2544 logger.endLogStep();
  2545. 2545
  2546. 2546 sleepMilliseconds(SLEEP_TIME);
  2547. 2547
  2548. 2548 // SBPS is disabled
  2549. 2549 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2550. 2550 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2551. 2551 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2552. 2552 logger.endLogStep();
  2553. 2553
  2554. 2554 // Wait until recovery time expires
  2555. 2555 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2556. 2556
  2557. 2557 // SBPS is enabled after recovery time expired
  2558. 2558 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2559. 2559 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2560. 2560 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2561. 2561 logger.endLogStep();
  2562. 2562 }
  2563. 2563
  2564. 2564 // Raise SBPS failed event
  2565. 2565 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  2566. 2566 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2567. 2567 logger.endLogStep();
  2568. 2568
  2569. 2569 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2570. 2570 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2571. 2571 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2572. 2572 logger.endLogStep();
  2573. 2573
  2574. 2574 sleepSeconds(dailyWindowSize + 2);
  2575. 2575
  2576. 2576 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2577. 2577
  2578. 2578 // SBPS is enabled, reached the maximum weekly restart count
  2579. 2579 logger.addLogStep("Step 7: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2580. 2580 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2581. 2581 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2582. 2582 logger.endLogStep();
  2583. 2583
  2584. 2584 // Raise SBPS failed event
  2585. 2585 logger.addLogStep("Step 8: Raise SBPS failed event using the injection tool");
  2586. 2586 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2587. 2587 logger.endLogStep();
  2588. 2588
  2589. 2589 sleepMilliseconds(SLEEP_TIME);
  2590. 2590
  2591. 2591 // SBPS is disabled, exceeds the maximum weekly restart count
  2592. 2592 logger.addLogStep("Step 9: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2593. 2593 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2594. 2594 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2595. 2595 logger.endLogStep();
  2596. 2596
  2597. 2597 // Verify additional weekly recovery sleep for an additional weekly size
  2598. 2598 sleepSeconds(dailyWindowSize + 2);
  2599. 2599
  2600. 2600 // SBPS is enabled, additional weekly recovery
  2601. 2601 logger.addLogStep("Step 10: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2602. 2602 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2603. 2603 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2604. 2604 logger.endLogStep();
  2605. 2605
  2606. 2606 // Release the LTE carrier.
  2607. 2607 logger.addLogStep("Step 11: Release the LTE carrier");
  2608. 2608 msiCarrierManager.releaseCarrier(dlLteCarrier);
  2609. 2609 logger.endLogStep();
  2610. 2610
  2611. 2611 sleepSeconds(2);
  2612. 2612
  2613. 2613 radioUnit.coli().elog().clear();
  2614. 2614
  2615. 2615 // Reset counter values
  2616. 2616 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  2617. 2617 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  2618. 2618 }
  2619. 2619
  2620. 2620 /**
  2621. 2621 * To verify Sbps restart logic for multiple LTE-TDD carriers
  2622. 2622 * Details:
  2623. 2623 * -Setup+activate 1st LTE-TDD carrier(branch A), verify SbpsSrv state: enabled(branch A)
  2624. 2624 * -Setup+activate 2nd LTE-TDD carrier(branch B), verify SbpsSrv state: enabled(branch B)
  2625. 2625 * -Raise SBPS failed event using the injection tool for both carriers
  2626. 2626 * -Check SBPS is temporarily disabled for the period set (10s) before minimum timer expires
  2627. 2627 * -SBPS should be restarted after minimum timer expires (SBPS enabled)
  2628. 2628 * -Release 1st LTE-TDD carrier(branch A), verify SbpsSrv state: disabled(branch A)
  2629. 2629 * -Release 2nd LTE-TDD carrier(branch B), verify SbpsSrv state: disabled(branch B)
  2630. 2630 * Migrated Mira TC:
  2631. 2631 * "TX_MOD C2, TC4: TDD, Verify Sbps restart logic for multiple LTE-TDD carriers, prio 1"
  2632. 2632 */
  2633. 2633 @Test(enabled = true)
  2634. 2634 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC4:T",
  2635. 2635 testTitle = "Verify Sbps restart logic for multiple LTE-TDD carriers",
  2636. 2636 testReqRef = " ",
  2637. 2637 testPriority = "A")
  2638. 2638 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2639. 2639 @Exclude({ @If(platformIs = RadioPlatform.PL4), @If(analogBeamFormingSupported = Bool.TRUE) })
  2640. 2640 @Run(@If(ratTypeAllOf = { RatType.LTE_TDD },
  2641. 2641 supportsRatAllOf = { RatType.LTE_TDD },
  2642. 2642 numTxBranchesMoreThan = 1,
  2643. 2643 supportSBPS = Bool.TRUE))
  2644. 2644 public void sbpsC2_TC4_T() {
  2645. 2645 setTestCase(
  2646. 2646 "SBPS-C2-TC4:T",
  2647. 2647 "Verify Sbps restart logic for multiple LTE-TDD carriers, prio 1");
  2648. 2648
  2649. 2649 ArrayList<Carrier> carriers = new ArrayList<Carrier>();
  2650. 2650 final int highTrafficLevel = 200;
  2651. 2651 int carrierId = 1;
  2652. 2652
  2653. 2653 List<AntennaBranchId> branchList = new ArrayList<AntennaBranchId>();
  2654. 2654 branchList.add(AntennaBranchId.A);
  2655. 2655 branchList.add(AntennaBranchId.B);
  2656. 2656
  2657. 2657 radioUnit.coli().elog().clear();
  2658. 2658
  2659. 2659 for (AntennaBranchId currBranch : branchList) {
  2660. 2660
  2661. 2661 logger.addLogStep("Step 1: Adjust the counter values");
  2662. 2662 radioUnit.coli().txm().sbps().modifyDelay(
  2663. 2663 currBranch, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2664. 2664 logger.endLogStep();
  2665. 2665
  2666. 2666 /*
  2667. 2667 * Setup LTE carrier.
  2668. 2668 * carrierId = 1, port = A, axcId = 1
  2669. 2669 * carrierId = 2, port = B, axcId = 1
  2670. 2670 */
  2671. 2671 logger.addLogStep("Step 2: Setup LTE carrier on branch " + currBranch);
  2672. 2672 dlLteCarrier = createLteTxCarrier(carrierId, currBranch.ordinal(), 1, RatType.LTE_TDD);
  2673. 2673 carriers.add(dlLteCarrier);
  2674. 2674 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2675. 2675 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2676. 2676 logger.endLogStep();
  2677. 2677
  2678. 2678 logger.addLogStep("Step 3: Send subscription request and check that report indication is received");
  2679. 2679 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2680. 2680 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2681. 2681 logger.endLogStep();
  2682. 2682
  2683. 2683 logger.addLogStep("Step 4: Activate LTE carrier on branch " + currBranch);
  2684. 2684 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2685. 2685 logger.endLogStep();
  2686. 2686
  2687. 2687 // Check if SBPS is enabled
  2688. 2688 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + currBranch);
  2689. 2689 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  2690. 2690 logger.endLogStep();
  2691. 2691
  2692. 2692 logger.addLogStep("Step 6: Verify that report indication is received");
  2693. 2693 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2694. 2694 logger.endLogStep();
  2695. 2695
  2696. 2696 carrierId++;
  2697. 2697 }
  2698. 2698
  2699. 2699 for (AntennaBranchId currBranch : branchList) {
  2700. 2700
  2701. 2701 // Raise SBPS failed event
  2702. 2702 logger.addLogStep("Step 7: Raise SBPS failed event using the injection tool");
  2703. 2703 radioUnit.coli().txm().sbps().injectFault(currBranch, SBPSEvent.TXL_SBPS_FAILED);
  2704. 2704 logger.endLogStep();
  2705. 2705
  2706. 2706 sleepMilliseconds(SLEEP_TIME);
  2707. 2707
  2708. 2708 // SBPS is disabled
  2709. 2709 logger.addLogStep("Step 8:" + SBPS_DISABLED_TEXT + currBranch);
  2710. 2710 VerifySbps.verifySpbsState(currBranch, SBPSState.TEMPORARILY_DISABLED);
  2711. 2711 logger.endLogStep();
  2712. 2712
  2713. 2713 logger.addLogStep("Step 9: Verify that report indication is received");
  2714. 2714 helper.verifyReportIndication(carriers.get(currBranch.ordinal()), msiClient, helper.SBPS_STATUS_DISABLED);
  2715. 2715 logger.endLogStep();
  2716. 2716
  2717. 2717 // Wait until recovery time expires
  2718. 2718 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2719. 2719
  2720. 2720 logger.addLogStep("Step 10: " + SBPS_ENABLED_TEXT + currBranch);
  2721. 2721 VerifySbps.verifySpbsState(currBranch, SBPSState.ENABLED);
  2722. 2722 logger.endLogStep();
  2723. 2723
  2724. 2724 logger.addLogStep("Step 11: Verify that report indication is received");
  2725. 2725 helper.verifyReportIndication(carriers.get(currBranch.ordinal()), msiClient, helper.SBPS_STATUS_ENABLED);
  2726. 2726 logger.endLogStep();
  2727. 2727 }
  2728. 2728
  2729. 2729 for (AntennaBranchId currBranch : branchList) {
  2730. 2730
  2731. 2731 logger.addLogStep("Step 12: Release the LTE carrier");
  2732. 2732 msiCarrierManager.releaseCarrier(carriers.get(currBranch.ordinal()));
  2733. 2733 logger.endLogStep();
  2734. 2734
  2735. 2735 logger.addLogStep("Step 13: " + SBPS_DISABLED_TEXT + currBranch);
  2736. 2736 VerifySbps.verifySpbsState(currBranch, SBPSState.DISABLED);
  2737. 2737 logger.endLogStep();
  2738. 2738
  2739. 2739 // Reset counter values
  2740. 2740 radioUnit.coli().txm().sbps().resetLimits(currBranch);
  2741. 2741 radioUnit.coli().txm().sbps().resetDelay(currBranch);
  2742. 2742 radioUnit.coli().txm().sbps().dumpDelay(currBranch);
  2743. 2743 }
  2744. 2744
  2745. 2745 carriers.clear();
  2746. 2746 branchList.clear();
  2747. 2747 }
  2748. 2748
  2749. 2749 /**
  2750. 2750 * To Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is
  2751. 2751 * high and restarts if traffic is low
  2752. 2752 * Details:
  2753. 2753 * - Change counter values (set to high traffic)
  2754. 2754 * - Setup + activate LTE carrier (branch A), verify SbpsSrv state and carrier
  2755. 2755 * configuration
  2756. 2756 * - Raise SBPS failed event using the injection tool after minimum timer expires
  2757. 2757 * - Check SBPS is not enabled for the recovery period
  2758. 2758 * - SBPS should not be restarted after minimum timer expires (SBPS disabled)
  2759. 2759 * - Change counter values (set to high traffic)
  2760. 2760 * - SBPS should be restarted after minimum timer expires (SBPS enabled)
  2761. 2761 * - Disable and release the carrier
  2762. 2762 * - Reset timers and limits to default
  2763. 2763 * Migrated Mira TC:
  2764. 2764 * "TX_MOD C2, TC4: LTE, Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low, prio 2"
  2765. 2765 */
  2766. 2766 @Test(enabled = true)
  2767. 2767 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC4:L",
  2768. 2768 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low",
  2769. 2769 testReqRef = " ",
  2770. 2770 testPriority = "B")
  2771. 2771 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2772. 2772 @Exclude(@If(platformIs = RadioPlatform.PL4))
  2773. 2773 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD },
  2774. 2774 supportsRatAllOf = { RatType.LTE_FDD },
  2775. 2775 numTxBranchesMoreThan = 0,
  2776. 2776 supportSBPS = Bool.TRUE))
  2777. 2777 public void sbpsC2_TC4_L() {
  2778. 2778 setTestCase(
  2779. 2779 "SBPS-C2-TC4:L",
  2780. 2780 "Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low, prio B");
  2781. 2781
  2782. 2782 int highTrafficLevel = 0;
  2783. 2783
  2784. 2784 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2785. 2785
  2786. 2786 // Change counter values (always high traffic case)
  2787. 2787 logger.addLogStep("Step 1: Change the counter values to high traffic");
  2788. 2788 radioUnit.coli().txm().sbps().modifyDelay(
  2789. 2789 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2790. 2790 logger.endLogStep();
  2791. 2791
  2792. 2792 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2793. 2793
  2794. 2794 // Setup LTE carrier
  2795. 2795 logger.addLogStep("Step 2: Setup and create LTE carrier");
  2796. 2796 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  2797. 2797 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2798. 2798 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2799. 2799 logger.endLogStep();
  2800. 2800
  2801. 2801 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  2802. 2802 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2803. 2803 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2804. 2804 logger.endLogStep();
  2805. 2805
  2806. 2806 logger.addLogStep("Step 4: Activate LTE carrier");
  2807. 2807 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2808. 2808 logger.endLogStep();
  2809. 2809
  2810. 2810 // Check if SBPS is enabled
  2811. 2811 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2812. 2812 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2813. 2813 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2814. 2814
  2815. 2815 logger.endLogStep();
  2816. 2816
  2817. 2817 // Raise SBPS failed event
  2818. 2818 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  2819. 2819 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  2820. 2820 logger.endLogStep();
  2821. 2821
  2822. 2822 sleepMilliseconds(SLEEP_TIME);
  2823. 2823
  2824. 2824 // SBPS is disabled
  2825. 2825 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2826. 2826 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2827. 2827 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2828. 2828
  2829. 2829 logger.endLogStep();
  2830. 2830
  2831. 2831 // Wait until recovery time expires
  2832. 2832 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  2833. 2833
  2834. 2834 // SBPS should not be restarted after minimum timer expires (SBPS is still disabled)
  2835. 2835 logger.addLogStep("Step 8: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2836. 2836 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  2837. 2837 logger.endLogStep();
  2838. 2838
  2839. 2839 // Change counter values (always low traffic case)
  2840. 2840 logger.addLogStep("Step 9: Change the counter values to low traffic");
  2841. 2841 highTrafficLevel = 200;
  2842. 2842 radioUnit.coli().txm().sbps().modifyDelay(
  2843. 2843 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2844. 2844 logger.endLogStep();
  2845. 2845
  2846. 2846 sleepMilliseconds(HIGH_TRAFFIC_RESTART_DELAY + 500); // ms
  2847. 2847
  2848. 2848 // SBPS is enabled after recovery time expired
  2849. 2849 logger.addLogStep("Step 10: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2850. 2850 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2851. 2851 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2852. 2852 logger.endLogStep();
  2853. 2853
  2854. 2854 // Release the LTE carrier.
  2855. 2855 logger.addLogStep("Step 11: Release the LTE carrier");
  2856. 2856 msiCarrierManager.releaseCarrier(dlLteCarrier);
  2857. 2857 logger.endLogStep();
  2858. 2858
  2859. 2859 sleepSeconds(2);
  2860. 2860
  2861. 2861 radioUnit.coli().elog().clear();
  2862. 2862
  2863. 2863 // Reset counter values
  2864. 2864 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  2865. 2865 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  2866. 2866 }
  2867. 2867
  2868. 2868 /**
  2869. 2869 * To Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL
  2870. 2870 * Details:
  2871. 2871 * - Change counter values
  2872. 2872 * - Setup + activate LTE carrier (branch A), verify SbpsSrv state and carrier configuration
  2873. 2873 * - Raise SBPS failed event using the injection tool (sbps-not-supported)
  2874. 2874 * - Check SBPS is not enabled for the recovery period
  2875. 2875 * - SBPS should not be restarted after minimum timer expires (SBPS disabled)
  2876. 2876 * - Disable and release the carrier
  2877. 2877 * - Reset timers and limits to default
  2878. 2878 * Migrated Mira TC:
  2879. 2879 * "TX_MOD C2, TC5: LTE, Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL, prio 2"
  2880. 2880 */
  2881. 2881 @Test(enabled = true)
  2882. 2882 @JcatMethod(testTag = "TX_MOD-C2,SBPS-TC5:L",
  2883. 2883 testTitle = "Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL",
  2884. 2884 testReqRef = " ",
  2885. 2885 testPriority = "B")
  2886. 2886 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  2887. 2887 @Exclude(@If(platformIs = RadioPlatform.PL4))
  2888. 2888 @Run(@If(ratTypeAllOf = { RatType.LTE_FDD },
  2889. 2889 supportsRatAllOf = { RatType.LTE_FDD },
  2890. 2890 numTxBranchesMoreThan = 0,
  2891. 2891 supportSBPS = Bool.TRUE))
  2892. 2892 public void sbpsC2_TC5_L() {
  2893. 2893 setTestCase(
  2894. 2894 "SBPS-C2-TC5:L",
  2895. 2895 "Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL, prio B");
  2896. 2896
  2897. 2897 final int highTrafficLevel = 200;
  2898. 2898
  2899. 2899 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2900. 2900
  2901. 2901 // Change counter values (recovery time 3s)
  2902. 2902 logger.addLogStep("Step 1: Change the counter values to high traffic");
  2903. 2903 radioUnit.coli().txm().sbps().modifyDelay(
  2904. 2904 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  2905. 2905 logger.endLogStep();
  2906. 2906
  2907. 2907 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  2908. 2908
  2909. 2909 // Setup LTE carrier
  2910. 2910 logger.addLogStep("Step 2: Setup and create LTE carrier");
  2911. 2911 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  2912. 2912 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  2913. 2913 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  2914. 2914 logger.endLogStep();
  2915. 2915
  2916. 2916 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  2917. 2917 helper.sendReportSubscriptionRequest(dlLteCarrier, msiClient);
  2918. 2918 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2919. 2919 logger.endLogStep();
  2920. 2920
  2921. 2921 logger.addLogStep("Step 4: Activate LTE carrier");
  2922. 2922 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  2923. 2923 logger.endLogStep();
  2924. 2924
  2925. 2925 radioUnit.coli().elog().clear();
  2926. 2926
  2927. 2927 // SBPS is enabled
  2928. 2928 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  2929. 2929 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  2930. 2930 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  2931. 2931 logger.endLogStep();
  2932. 2932
  2933. 2933 // Raise SBPS failed event
  2934. 2934 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  2935. 2935 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_NOT_SUPPORTED);
  2936. 2936 logger.endLogStep();
  2937. 2937
  2938. 2938 sleepMilliseconds(SLEEP_TIME);
  2939. 2939
  2940. 2940 // SBPS is disabled
  2941. 2941 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2942. 2942 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2943. 2943 helper.verifyReportIndication(dlLteCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  2944. 2944
  2945. 2945 ElvisAssert.assertEquals(true,
  2946. 2946 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_PERMANENTLY_DISABLED_TXL_TEXT));
  2947. 2947 logger.endLogStep();
  2948. 2948
  2949. 2949 sleepSeconds((DAILY_RECOVERY_SLEEP_TIME));
  2950. 2950
  2951. 2951 // SBPS is always in disabled state and RU is not restarted
  2952. 2952 logger.addLogStep("Step 8: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  2953. 2953 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  2954. 2954 ElvisAssert.assertEquals(true,
  2955. 2955 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_PERMANENTLY_DISABLED_TXL_TEXT));
  2956. 2956 logger.endLogStep();
  2957. 2957
  2958. 2958 // Release the LTE carrier.
  2959. 2959 logger.addLogStep("Step 9: Release the LTE carrier");
  2960. 2960 msiCarrierManager.releaseCarrier(dlLteCarrier);
  2961. 2961 logger.endLogStep();
  2962. 2962
  2963. 2963 sleepSeconds(2);
  2964. 2964
  2965. 2965 radioUnit.coli().elog().clear();
  2966. 2966
  2967. 2967 // Reset counter values
  2968. 2968 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  2969. 2969 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  2970. 2970
  2971. 2971 /*
  2972. 2972 * Restart the radio:
  2973. 2973 * After the coli command 'txm brc a sbps-not-supported' (fault injection), parameter
  2974. 2974 * isSbpsCapable remains in the state False. It is not possible to return to
  2975. 2975 * the initial state (isSbpsCapable=True) with a coli command.
  2976. 2976 * Therefore, it is necessary to restart the radio.
  2977. 2977 */
  2978. 2978 ColiCommandsUtils.restartToDefaultSlotAndWaitUntilRuUp(radioUnit.coli());
  2979. 2979 }
  2980. 2980
  2981. 2981 /**
  2982. 2982 * To Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer
  2983. 2983 * expires for active GSM carrier
  2984. 2984 * Details:
  2985. 2985 * - Change minimum timer value (through db or cmd) 10s
  2986. 2986 * - Setup + activate GSM carrier (branch A), verify SbpsSrv state and carrier configuration
  2987. 2987 * - Raise SBPS failed event using the injection tool after minimum timer expires
  2988. 2988 * - Check SBPS is disabled for the period set (10s)
  2989. 2989 * - SBPS should be restarted after minimum timer expires (SBPS enabled)
  2990. 2990 * - Disable and release the carrier
  2991. 2991 * - Reset timers and limits to default
  2992. 2992 * "TX_MOD C4, TC1: GSM, RU does not restart SBPS after fault is raised from TXL before the minimum timer expires, prio 2"
  2993. 2993 */
  2994. 2994 @Test(enabled = true)
  2995. 2995 @JcatMethod(testTag = "TX_MOD-C4,SBPS-TC1:G",
  2996. 2996 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer expires",
  2997. 2997 testReqRef = " ",
  2998. 2998 testPriority = "B")
  2999. 2999 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  3000. 3000 @Exclude(@If(platformIs = RadioPlatform.PL4))
  3001. 3001 @Run(@If(ratTypeAllOf = { RatType.GSM },
  3002. 3002 supportsRatAllOf = { RatType.GSM },
  3003. 3003 numTxBranchesMoreThan = 0,
  3004. 3004 supportSBPS = Bool.TRUE,
  3005. 3005 sbpsSupportedRatGsm = Bool.TRUE,
  3006. 3006 supportMR299 = Bool.TRUE))
  3007. 3007 public void sbpsC4_TC1_G() {
  3008. 3008 setTestCase(
  3009. 3009 "SBPS-C4-TC1:G",
  3010. 3010 "Verify RU does not restart SBPS after fault is raised from TXL before the minimum timer expires for GSM carrier, prio B");
  3011. 3011
  3012. 3012 final int highTrafficLevel = 200;
  3013. 3013
  3014. 3014 // Change counter values (recovery time 3s)
  3015. 3015 logger.addLogStep("Change the counter values");
  3016. 3016 radioUnit.coli().txm().sbps().modifyDelay(
  3017. 3017 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3018. 3018 logger.endLogStep();
  3019. 3019
  3020. 3020 radioUnit.coli().elog().clear();
  3021. 3021
  3022. 3022 // Create and setup GSM carrier on branch A
  3023. 3023 logger.addLogStep("Step 1: Setup GSM carrier on branch " + AntennaBranchId.A);
  3024. 3024 // carrierId = 0, port = A, axcId = 1
  3025. 3025 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3026. 3026 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3027. 3027 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3028. 3028 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3029. 3029 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3030. 3030 logger.endLogStep();
  3031. 3031
  3032. 3032 logger.addLogStep("Step 2: Send report subscription request and check that report indications are received");
  3033. 3033 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  3034. 3034 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3035. 3035 logger.endLogStep();
  3036. 3036
  3037. 3037 logger.addLogStep("Step 3: Activate GSM carrier");
  3038. 3038 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  3039. 3039 logger.endLogStep();
  3040. 3040
  3041. 3041 // Check if SBPS is enabled
  3042. 3042 logger.addLogStep("Step 4: Verify sbps state");
  3043. 3043 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  3044. 3044 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3045. 3045 logger.endLogStep();
  3046. 3046
  3047. 3047 // Raise SBPS failed event
  3048. 3048 logger.addLogStep("Step 5: Raise SBPS failed event using the injection tool");
  3049. 3049 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3050. 3050 logger.endLogStep();
  3051. 3051
  3052. 3052 sleepMilliseconds(SLEEP_TIME);
  3053. 3053
  3054. 3054 // SBPS is disabled
  3055. 3055 logger.addLogStep("Step 6:" + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3056. 3056 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3057. 3057 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3058. 3058 ElvisAssert.assertEquals(true,
  3059. 3059 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  3060. 3060 logger.endLogStep();
  3061. 3061
  3062. 3062 // Wait until recovery time expires
  3063. 3063 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  3064. 3064
  3065. 3065 // SBPS is enabled after recovery time expired
  3066. 3066 logger.addLogStep("Step 7: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3067. 3067 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3068. 3068 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3069. 3069 ElvisAssert.assertEquals(true, radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_RECOVERED_TEXT));
  3070. 3070 logger.endLogStep();
  3071. 3071
  3072. 3072 // Release the GSM carrier.
  3073. 3073 logger.addLogStep("Step 8: Release the GSM carrier");
  3074. 3074 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  3075. 3075 logger.endLogStep();
  3076. 3076 sleepSeconds(5);
  3077. 3077
  3078. 3078 // Reset counter values
  3079. 3079 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  3080. 3080 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  3081. 3081 }
  3082. 3082
  3083. 3083 /**
  3084. 3084 * To Verify RU does not restart SBPS after fault is raised from TXL if the maximum
  3085. 3085 * daily restart count has been reached within daily sliding window
  3086. 3086 * Details:
  3087. 3087 * - Change counter values (2 restarts and 3s)
  3088. 3088 * - Setup + activate GSM carrier (branch A), verify SbpsSrv state and carrier configuration
  3089. 3089 * 1- Raise SBPS failed event using the injection tool after minimum timer expires
  3090. 3090 * 2- Check SBPS is disabled for the period set (10s)
  3091. 3091 * 3- SBPS should be restarted after minimum timer expires (SBPS enabled)
  3092. 3092 * - Do steps 1-3 until maximum daily restart count (2) has been reached within daily sliding
  3093. 3093 * window
  3094. 3094 * - Raise SBPS failed event using the injection tool
  3095. 3095 * - Wait 11s
  3096. 3096 * - SBPS should not be restarted (Disabled)
  3097. 3097 * - Disable and release the carrier
  3098. 3098 * - Reset timers and limits to default
  3099. 3099 * "TX_MOD C4, TC2: GSM, Verify RU does not restart SBPS after fault is raised from TXL if the
  3100. 3100 * maximum daily restart count has been reached within daily sliding window, prio 2"
  3101. 3101 */
  3102. 3102 @Test(enabled = true)
  3103. 3103 @JcatMethod(testTag = "TX_MOD-C4,SBPS-TC2:G",
  3104. 3104 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL if the maximum daily restart count has been reached within daily sliding window",
  3105. 3105 testReqRef = " ",
  3106. 3106 testPriority = "B")
  3107. 3107 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  3108. 3108 @Exclude(@If(platformIs = RadioPlatform.PL4))
  3109. 3109 @Run(@If(ratTypeAllOf = { RatType.GSM },
  3110. 3110 supportsRatAllOf = { RatType.GSM },
  3111. 3111 numTxBranchesMoreThan = 0,
  3112. 3112 supportSBPS = Bool.TRUE,
  3113. 3113 sbpsSupportedRatGsm = Bool.TRUE,
  3114. 3114 supportMR299 = Bool.TRUE))
  3115. 3115 public void sbpsC4_TC2_G() {
  3116. 3116 setTestCase(
  3117. 3117 "SBPS-C4-TC2:G",
  3118. 3118 "Verify RU does not restart SBPS after fault is raised from TXL if the maximum daily restart count has been reached within daily sliding window for GSM carrier, prio B");
  3119. 3119
  3120. 3120 final int highTrafficLevel = 200;
  3121. 3121 final int weeklyRestartCount = 3;
  3122. 3122 final int weeklyWindowSize = DAILY_WINDOW_SIZE * 8; // 128 s
  3123. 3123 final int dailyRestartCount = 2;
  3124. 3124 final int dailyWindowSize = DAILY_WINDOW_SIZE * 4; // 64 s
  3125. 3125
  3126. 3126 // Change counter values (2 restarts and 3s)
  3127. 3127 logger.addLogStep("Step 1: Change the counter values");
  3128. 3128 radioUnit.coli().txm().sbps().modifyDelay(
  3129. 3129 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3130. 3130 radioUnit.coli().txm().sbps().modifySlidingWindowLimits(
  3131. 3131 AntennaBranchId.A, weeklyRestartCount, weeklyWindowSize, dailyRestartCount, dailyWindowSize);
  3132. 3132 logger.endLogStep();
  3133. 3133
  3134. 3134 radioUnit.coli().elog().clear();
  3135. 3135
  3136. 3136 // Create and setup GSM carrier on branch A
  3137. 3137 logger.addLogStep("Step 2: Setup GSM carrier on branch " + AntennaBranchId.A);
  3138. 3138 // carrierId = 0, port = A, axcId = 1
  3139. 3139 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3140. 3140 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3141. 3141 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3142. 3142 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3143. 3143 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3144. 3144 logger.endLogStep();
  3145. 3145
  3146. 3146 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  3147. 3147 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  3148. 3148 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3149. 3149 logger.endLogStep();
  3150. 3150
  3151. 3151 logger.addLogStep("Step 4: Activate GSM carrier");
  3152. 3152 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  3153. 3153 logger.endLogStep();
  3154. 3154
  3155. 3155 // Check if SBPS is enabled
  3156. 3156 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3157. 3157 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3158. 3158 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3159. 3159 logger.endLogStep();
  3160. 3160
  3161. 3161 for (int dailyCount = 0; dailyCount < dailyRestartCount; ++dailyCount) {
  3162. 3162 radioUnit.coli().elog().clear();
  3163. 3163
  3164. 3164 // Raise SBPS failed event
  3165. 3165 logger.addLogStep("Raise SBPS failed event using the injection tool");
  3166. 3166 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3167. 3167 logger.endLogStep();
  3168. 3168
  3169. 3169 sleepMilliseconds(SLEEP_TIME);
  3170. 3170
  3171. 3171 // SBPS is disabled, temporarily
  3172. 3172 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3173. 3173 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3174. 3174 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3175. 3175 ElvisAssert.assertEquals(true,
  3176. 3176 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  3177. 3177 logger.endLogStep();
  3178. 3178
  3179. 3179 // Wait until recovery time expires
  3180. 3180 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  3181. 3181
  3182. 3182 // SBPS is enabled after recovery time expired and if sbps was supported before
  3183. 3183 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3184. 3184 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3185. 3185 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3186. 3186 ElvisAssert.assertEquals(true,
  3187. 3187 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_RECOVERED_TEXT));
  3188. 3188 logger.endLogStep();
  3189. 3189 }
  3190. 3190
  3191. 3191 radioUnit.coli().elog().clear();
  3192. 3192
  3193. 3193 // Raise SBPS failed event
  3194. 3194 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  3195. 3195 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3196. 3196 logger.endLogStep();
  3197. 3197
  3198. 3198 sleepMilliseconds(SLEEP_TIME);
  3199. 3199
  3200. 3200 // SBPS is disabled
  3201. 3201 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3202. 3202 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3203. 3203 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3204. 3204 ElvisAssert.assertEquals(true,
  3205. 3205 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_DISABLED_TXL_TEXT));
  3206. 3206 logger.endLogStep();
  3207. 3207
  3208. 3208 radioUnit.coli().elog().clear();
  3209. 3209
  3210. 3210 // Wait until recovery time expires
  3211. 3211 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  3212. 3212
  3213. 3213 // RU does not restart because of daily count = 3 and Sbps is still in temporarily disabled state
  3214. 3214 logger.addLogStep("Step 8: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3215. 3215 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3216. 3216 logger.endLogStep();
  3217. 3217
  3218. 3218 // Release the GSM carrier.
  3219. 3219 logger.addLogStep("Step 9: Release the GSM carrier");
  3220. 3220 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  3221. 3221 logger.endLogStep();
  3222. 3222
  3223. 3223 // Reset counter values
  3224. 3224 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  3225. 3225 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  3226. 3226 }
  3227. 3227
  3228. 3228 /**
  3229. 3229 * To Verify RU does not restart SBPS after fault is raised from TXL if the total
  3230. 3230 * maximum restart count has been reached within weekly sliding window
  3231. 3231 * Details:
  3232. 3232 * - Change counter values (through db or cmd) (1 daily, 2 Weekly, 10s, 20s (daily),
  3233. 3233 * 30s(weekly))
  3234. 3234 * - Setup + activate GSM carrier (branch A), verify SbpsSrv state and carrier configuration
  3235. 3235 * 1- Raise SBPS failed event using the injection tool after minimum timer expires
  3236. 3236 * 2- Check SBPS is disabled for the period set (3s)
  3237. 3237 * 3- SBPS should be restarted after minimum timer expires (SBPS enabled)
  3238. 3238 * - Do steps 1-3 until maximum daily restart count (2) has been reached within daily sliding
  3239. 3239 * window
  3240. 3240 * - Check SBPS is re-enabled
  3241. 3241 * - Raise SBPS failed event using the injection tool
  3242. 3242 * - Wait 1 day passes (21s)
  3243. 3243 * - SBPS should be restarted (Enabled)
  3244. 3244 * - Raise SBPS failed event using the injection tool
  3245. 3245 * - Check SBPS is disabled
  3246. 3246 * - Wait 11s
  3247. 3247 * - SBPS should not be restarted (disabled)
  3248. 3248 * - Wait 1 week passes (31s)
  3249. 3249 * - Check SBPS is re-enabled
  3250. 3250 * - Disable and release the carrier
  3251. 3251 * - Reset timers and limits to default
  3252. 3252 * "TX_MOD C4, TC3: GSM, Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window, prio 2"
  3253. 3253 */
  3254. 3254 @Test(enabled = true)
  3255. 3255 @JcatMethod(testTag = "TX_MOD-C4,SBPS-TC3:G",
  3256. 3256 testTitle = "Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window",
  3257. 3257 testReqRef = " ",
  3258. 3258 testPriority = "B")
  3259. 3259 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  3260. 3260 @Exclude(@If(platformIs = RadioPlatform.PL4))
  3261. 3261 @Run(@If(ratTypeAllOf = { RatType.GSM },
  3262. 3262 supportsRatAllOf = { RatType.GSM },
  3263. 3263 numTxBranchesMoreThan = 0,
  3264. 3264 supportSBPS = Bool.TRUE,
  3265. 3265 sbpsSupportedRatGsm = Bool.TRUE,
  3266. 3266 supportMR299 = Bool.TRUE))
  3267. 3267 public void sbpsC4_TC3_G() {
  3268. 3268 setTestCase(
  3269. 3269 "SBPS-C4-TC3:G",
  3270. 3270 "Verify RU does not restart SBPS with TXL sbps fault if the maximum restart count has been reached within weekly sliding window, prio B");
  3271. 3271
  3272. 3272 final int highTrafficLevel = 200;
  3273. 3273 final int weeklyRestartCount = 2;
  3274. 3274 final int weeklyWindowSize = 20; // 20 s
  3275. 3275 final int dailyRestartCount = 1;
  3276. 3276 final int dailyWindowSize = 10; // 10 s
  3277. 3277
  3278. 3278 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3279. 3279
  3280. 3280 // Change counter values (2 weekly restarts and 20s; 1 daily restart and 10s)
  3281. 3281 logger.addLogStep("Step 1: Change the counter values");
  3282. 3282 radioUnit.coli().txm().sbps().modifyDelay(
  3283. 3283 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3284. 3284 radioUnit.coli().txm().sbps().modifySlidingWindowLimits(
  3285. 3285 AntennaBranchId.A, weeklyRestartCount, weeklyWindowSize, dailyRestartCount, dailyWindowSize);
  3286. 3286 logger.endLogStep();
  3287. 3287
  3288. 3288 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3289. 3289
  3290. 3290 radioUnit.coli().elog().clear();
  3291. 3291
  3292. 3292 // Create and setup GSM carrier on branch A
  3293. 3293 logger.addLogStep("Step 2: Setup GSM carrier on branch " + AntennaBranchId.A);
  3294. 3294 // carrierId = 0, port = A, axcId = 1
  3295. 3295 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3296. 3296 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3297. 3297 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3298. 3298 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3299. 3299 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3300. 3300 logger.endLogStep();
  3301. 3301
  3302. 3302 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  3303. 3303 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  3304. 3304 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3305. 3305 logger.endLogStep();
  3306. 3306
  3307. 3307 logger.addLogStep("Step 4: Activate GSM carrier");
  3308. 3308 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  3309. 3309 logger.endLogStep();
  3310. 3310
  3311. 3311 // Check if SBPS is enabled
  3312. 3312 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3313. 3313 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  3314. 3314 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3315. 3315 logger.endLogStep();
  3316. 3316
  3317. 3317 // Verify daily recovery
  3318. 3318 for (int dailyCount = 0; dailyCount < dailyRestartCount; ++dailyCount) {
  3319. 3319
  3320. 3320 // Raise SBPS failed event
  3321. 3321 logger.addLogStep("Raise SBPS failed event using the injection tool");
  3322. 3322 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3323. 3323 logger.endLogStep();
  3324. 3324
  3325. 3325 sleepMilliseconds(SLEEP_TIME);
  3326. 3326
  3327. 3327 // SBPS is disabled
  3328. 3328 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3329. 3329 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3330. 3330 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3331. 3331 logger.endLogStep();
  3332. 3332
  3333. 3333 // Wait until recovery time expires
  3334. 3334 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  3335. 3335
  3336. 3336 // SBPS is enabled after recovery time expired
  3337. 3337 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3338. 3338 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3339. 3339 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3340. 3340 logger.endLogStep();
  3341. 3341 }
  3342. 3342
  3343. 3343 // Raise SBPS failed event
  3344. 3344 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  3345. 3345 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3346. 3346 logger.endLogStep();
  3347. 3347
  3348. 3348 logger.addLogStep(SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3349. 3349 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3350. 3350 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3351. 3351 logger.endLogStep();
  3352. 3352
  3353. 3353 sleepSeconds(dailyWindowSize + 2);
  3354. 3354
  3355. 3355 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3356. 3356
  3357. 3357 // SBPS is enabled, reached the maximum weekly restart count
  3358. 3358 logger.addLogStep("Step 7: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3359. 3359 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3360. 3360 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3361. 3361 logger.endLogStep();
  3362. 3362
  3363. 3363 // Raise SBPS failed event
  3364. 3364 logger.addLogStep("Step 8: Raise SBPS failed event using the injection tool");
  3365. 3365 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3366. 3366 logger.endLogStep();
  3367. 3367
  3368. 3368 sleepMilliseconds(SLEEP_TIME);
  3369. 3369
  3370. 3370 // SBPS is disabled, exceeds the maximum weekly restart count
  3371. 3371 logger.addLogStep("Step 9: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3372. 3372 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3373. 3373 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3374. 3374 logger.endLogStep();
  3375. 3375
  3376. 3376 // Verify additional weekly recovery sleep for an additional weekly size
  3377. 3377 sleepSeconds(dailyWindowSize + 2);
  3378. 3378
  3379. 3379 // SBPS is enabled if gsm sbps is supported, additional weekly recovery
  3380. 3380 logger.addLogStep("Step 10: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3381. 3381 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPS_STATE_GSM);
  3382. 3382 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3383. 3383 logger.endLogStep();
  3384. 3384
  3385. 3385 // Release the GSM carrier.
  3386. 3386 logger.addLogStep("Step 11: Release the GSM carrier");
  3387. 3387 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  3388. 3388 logger.endLogStep();
  3389. 3389 sleepSeconds(5);
  3390. 3390
  3391. 3391 radioUnit.coli().elog().clear();
  3392. 3392
  3393. 3393 // Reset counter values
  3394. 3394 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  3395. 3395 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  3396. 3396 }
  3397. 3397
  3398. 3398 /**
  3399. 3399 * To Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is
  3400. 3400 * high and restarts if traffic is low
  3401. 3401 * Details:
  3402. 3402 * - Change counter values (set to high traffic)
  3403. 3403 * - Setup + activate GSM carrier (branch A), verify SbpsSrv state and carrier configuration
  3404. 3404 * - Raise SBPS failed event using the injection tool after minimum timer expires
  3405. 3405 * - Check SBPS is not enabled for the recovery period
  3406. 3406 * - SBPS should not be restarted after minimum timer expires (SBPS disabled)
  3407. 3407 * - Change counter values (set to high traffic)
  3408. 3408 * - SBPS should be restarted after minimum timer expires (SBPS enabled)
  3409. 3409 * - Disable and release the carrier
  3410. 3410 * - Reset timers and limits to default
  3411. 3411 * "TX_MOD C4, TC4: GSM, Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low, prio 2"
  3412. 3412 */
  3413. 3413 @Test(enabled = true)
  3414. 3414 @JcatMethod(testTag = "TX_MOD-C4,SBPS-TC4:G",
  3415. 3415 testTitle = "Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low",
  3416. 3416 testReqRef = " ",
  3417. 3417 testPriority = "B")
  3418. 3418 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  3419. 3419 @Exclude(@If(platformIs = RadioPlatform.PL4))
  3420. 3420 @Run(@If(ratTypeAllOf = { RatType.GSM },
  3421. 3421 supportsRatAllOf = { RatType.GSM },
  3422. 3422 numTxBranchesMoreThan = 0,
  3423. 3423 supportSBPS = Bool.TRUE,
  3424. 3424 sbpsSupportedRatGsm = Bool.TRUE,
  3425. 3425 supportMR299 = Bool.TRUE))
  3426. 3426 public void sbpsC4_TC4_G() {
  3427. 3427 setTestCase(
  3428. 3428 "SBPS-C4-TC4:G",
  3429. 3429 "Verify RU does not restart SBPS after fault is raised from TXL if the traffic level is high and restarts if traffic is low, prio B");
  3430. 3430
  3431. 3431 int highTrafficLevel = 0;
  3432. 3432
  3433. 3433 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3434. 3434
  3435. 3435 // Change counter values (always high traffic case)
  3436. 3436 logger.addLogStep("Step 1: Change the counter values to high traffic");
  3437. 3437 radioUnit.coli().txm().sbps().modifyDelay(
  3438. 3438 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3439. 3439 logger.endLogStep();
  3440. 3440
  3441. 3441 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3442. 3442
  3443. 3443 // Create and setup GSM carrier on branch A
  3444. 3444 logger.addLogStep("Step 2: Setup GSM carrier on branch " + AntennaBranchId.A);
  3445. 3445 // carrierId = 0, port = A, axcId = 1
  3446. 3446 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3447. 3447 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3448. 3448 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3449. 3449 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3450. 3450 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3451. 3451 logger.endLogStep();
  3452. 3452
  3453. 3453 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  3454. 3454 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  3455. 3455 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3456. 3456 logger.endLogStep();
  3457. 3457
  3458. 3458 logger.addLogStep("Step 4: Activate GSM carrier");
  3459. 3459 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  3460. 3460 logger.endLogStep();
  3461. 3461
  3462. 3462 // Check if SBPS is enabled
  3463. 3463 logger.addLogStep("Step 5: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3464. 3464 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3465. 3465 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3466. 3466 logger.endLogStep();
  3467. 3467
  3468. 3468 // Raise SBPS failed event
  3469. 3469 logger.addLogStep("Step 6: Raise SBPS failed event using the injection tool");
  3470. 3470 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_FAILED);
  3471. 3471 logger.endLogStep();
  3472. 3472
  3473. 3473 sleepMilliseconds(SLEEP_TIME);
  3474. 3474
  3475. 3475 // SBPS is disabled
  3476. 3476 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3477. 3477 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3478. 3478 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3479. 3479 logger.endLogStep();
  3480. 3480
  3481. 3481 // Wait until recovery time expires
  3482. 3482 sleepSeconds(DAILY_RECOVERY_SLEEP_TIME);
  3483. 3483
  3484. 3484 // SBPS should not be restarted after minimum timer expires (SBPS is still disabled)
  3485. 3485 logger.addLogStep("Step 8: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3486. 3486 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.TEMPORARILY_DISABLED);
  3487. 3487 logger.endLogStep();
  3488. 3488
  3489. 3489 // Change counter values (always low traffic case)
  3490. 3490 logger.addLogStep("Step 9: Change the counter values to low traffic");
  3491. 3491 highTrafficLevel = 200;
  3492. 3492 radioUnit.coli().txm().sbps().modifyDelay(
  3493. 3493 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3494. 3494 logger.endLogStep();
  3495. 3495
  3496. 3496 sleepMilliseconds(HIGH_TRAFFIC_RESTART_DELAY + 500); // ms
  3497. 3497
  3498. 3498 // SBPS is enabled after recovery time expired
  3499. 3499 logger.addLogStep("Step 10: " + SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3500. 3500 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3501. 3501 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3502. 3502 logger.endLogStep();
  3503. 3503
  3504. 3504 // Release the GSM carrier.
  3505. 3505 logger.addLogStep("Step 11: Release the GSM carrier");
  3506. 3506 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  3507. 3507 logger.endLogStep();
  3508. 3508 sleepSeconds(5);
  3509. 3509
  3510. 3510 radioUnit.coli().elog().clear();
  3511. 3511
  3512. 3512 // Reset counter values
  3513. 3513 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  3514. 3514 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  3515. 3515 }
  3516. 3516
  3517. 3517 /**
  3518. 3518 * To Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL
  3519. 3519 * Details:
  3520. 3520 * - Change counter values
  3521. 3521 * - Setup + activate GSM carrier (branch A), verify SbpsSrv state and carrier configuration
  3522. 3522 * - Raise SBPS failed event using the injection tool (sbps-not-supported)
  3523. 3523 * - Check SBPS is not enabled for the recovery period
  3524. 3524 * - SBPS should not be restarted after minimum timer expires (SBPS disabled)
  3525. 3525 * - Disable and release the carrier
  3526. 3526 * - Reset timers and limits to default
  3527. 3527 * "TX_MOD C4, TC5: GSM, Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL, prio 2"
  3528. 3528 */
  3529. 3529 @Test(enabled = true)
  3530. 3530 @JcatMethod(testTag = "TX_MOD-C4,SBPS-TC5:G",
  3531. 3531 testTitle = "Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL",
  3532. 3532 testReqRef = " ",
  3533. 3533 testPriority = "B")
  3534. 3534 @Groups({ TestGroup.ACTIVATES_TX, TestGroup.LOOP_60 })
  3535. 3535 @Exclude(@If(platformIs = RadioPlatform.PL4))
  3536. 3536 @Run(@If(ratTypeAllOf = { RatType.GSM },
  3537. 3537 supportsRatAllOf = { RatType.GSM },
  3538. 3538 numTxBranchesMoreThan = 0,
  3539. 3539 supportSBPS = Bool.TRUE,
  3540. 3540 sbpsSupportedRatGsm = Bool.TRUE,
  3541. 3541 supportMR299 = Bool.TRUE
  3542. 3542 ))
  3543. 3543 public void sbpsC4_TC5_G() {
  3544. 3544 setTestCase(
  3545. 3545 "SBPS-C4-TC5:G",
  3546. 3546 "Verify RU does not restart SBPS after sbps-not-supported fault is raised from TXL, prio B");
  3547. 3547
  3548. 3548 final int highTrafficLevel = 200;
  3549. 3549
  3550. 3550 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3551. 3551
  3552. 3552 int startingSlot = radioUnit.coli().xp().lmclist().getRunningLoadModule().getSlotNumber();
  3553. 3553
  3554. 3554 // Change counter values (recovery time 3s)
  3555. 3555 logger.addLogStep("Step 1: Change the counter values to high traffic");
  3556. 3556 radioUnit.coli().txm().sbps().modifyDelay(
  3557. 3557 AntennaBranchId.A, RECOVERY_TIME, highTrafficLevel, HIGH_TRAFFIC_RESTART_DELAY, BRANCH_BUSY_DELAY);
  3558. 3558 logger.endLogStep();
  3559. 3559
  3560. 3560 radioUnit.coli().txm().sbps().dumpLimits(AntennaBranchId.A);
  3561. 3561
  3562. 3562 // Create and setup GSM carrier on branch A
  3563. 3563 logger.addLogStep("Step 2: Setup GSM carrier on branch " + AntennaBranchId.A);
  3564. 3564 // carrierId = 0, port = A, axcId = 1
  3565. 3565 dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3566. 3566 dlGsmCarrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3567. 3567 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3568. 3568 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3569. 3569 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3570. 3570 logger.endLogStep();
  3571. 3571
  3572. 3572 logger.addLogStep("Step 3: Send report subscription request and check that report indications are received");
  3573. 3573 helper.sendReportSubscriptionRequest(dlGsmCarrier, msiClient);
  3574. 3574 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3575. 3575 logger.endLogStep();
  3576. 3576
  3577. 3577 logger.addLogStep("Step 4: Activate GSM carrier");
  3578. 3578 VerifyCarrierControl.verifyActivateAndActivated(dlGsmCarrier, msiCarrierManager);
  3579. 3579 logger.endLogStep();
  3580. 3580
  3581. 3581 // Check if SBPS is enabled
  3582. 3582 logger.addLogStep(SBPS_ENABLED_TEXT + AntennaBranchId.A);
  3583. 3583 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.ENABLED);
  3584. 3584 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_ENABLED);
  3585. 3585 logger.endLogStep();
  3586. 3586
  3587. 3587 radioUnit.coli().elog().clear();
  3588. 3588
  3589. 3589 // Raise SBPS failed event
  3590. 3590 logger.addLogStep("Step 5: Raise SBPS failed event using the injection tool");
  3591. 3591 radioUnit.coli().txm().sbps().injectFault(AntennaBranchId.A, SBPSEvent.TXL_SBPS_NOT_SUPPORTED);
  3592. 3592 logger.endLogStep();
  3593. 3593
  3594. 3594 sleepMilliseconds(SLEEP_TIME);
  3595. 3595
  3596. 3596 // SBPS is disabled
  3597. 3597 logger.addLogStep("Step 6: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3598. 3598 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  3599. 3599 helper.verifyReportIndication(dlGsmCarrier, msiClient, helper.SBPS_STATUS_DISABLED);
  3600. 3600 ElvisAssert.assertEquals(true,
  3601. 3601 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_PERMANENTLY_DISABLED_TXL_TEXT));
  3602. 3602 logger.endLogStep();
  3603. 3603
  3604. 3604 sleepSeconds((DAILY_RECOVERY_SLEEP_TIME));
  3605. 3605
  3606. 3606 // SBPS is always in disabled state and RU is not restarted
  3607. 3607 logger.addLogStep("Step 7: " + SBPS_DISABLED_TEXT + AntennaBranchId.A);
  3608. 3608 VerifySbps.verifySpbsState(AntennaBranchId.A, SBPSState.DISABLED);
  3609. 3609 ElvisAssert.assertEquals(true,
  3610. 3610 radioUnit.coli().elog().readRawOutput().contains(ELOG_SBPS_PERMANENTLY_DISABLED_TXL_TEXT));
  3611. 3611 logger.endLogStep();
  3612. 3612
  3613. 3613 // Release the GSM carrier.
  3614. 3614 logger.addLogStep("Step 8: Release the GSM carrier");
  3615. 3615 msiCarrierManager.releaseCarrier(dlGsmCarrier);
  3616. 3616 logger.endLogStep();
  3617. 3617 sleepSeconds(5);
  3618. 3618
  3619. 3619 radioUnit.coli().elog().clear();
  3620. 3620
  3621. 3621 // Reset counter values
  3622. 3622 radioUnit.coli().txm().sbps().resetLimits(AntennaBranchId.A);
  3623. 3623 radioUnit.coli().txm().sbps().resetDelay(AntennaBranchId.A);
  3624. 3624
  3625. 3625 //Set back the radio to the same slot as when the testcase started
  3626. 3626 ColiCommandsUtils.restartBySlotNbrAndWaitUntilRuUp(radioUnit.coli(), startingSlot);
  3627. 3627 }
  3628. 3628
  3629. 3629 /**
  3630. 3630 * Purpose:
  3631. 3631 * To verify G2 SBPS configuration register.
  3632. 3632 * Details:
  3633. 3633 * Setup+activate
  3634. 3634 * LTE carrier (branch A), verify evc_sbps_conf_register register when sbps enable
  3635. 3635 *
  3636. 3636 * @custom.references
  3637. 3637 * "TX_MOD C5, TC16: L, Verify evc_sbps_conf_register when sbps enable, prio 1"
  3638. 3638 */
  3639. 3639 @Test(enabled = true)
  3640. 3640 @JcatMethod(testTag = "TX_MOD-C5,SBPS-TC16:L",
  3641. 3641 testTitle = "Verify evc_sbps_conf_register when sbps enable",
  3642. 3642 testReqRef = " ",
  3643. 3643 testPriority = "A")
  3644. 3644 @Groups({ TestGroup.ACTIVATES_TX,
  3645. 3645 TestGroup.LOOP_60 })
  3646. 3646 @Run(@If(ratTypeConnection1OneOf = { RatType.LTE_FDD },
  3647. 3647 platformIs = RadioPlatform.NGR_G2,
  3648. 3648 numTxBranchesMoreThan = 0,
  3649. 3649 supportSBPS = Bool.TRUE))
  3650. 3650 public void sbpsC5_TC16_L() {
  3651. 3651 setTestCase("SBPS-C5-TC16:L",
  3652. 3652 "Verify evc_sbps_conf_register when sbps enable, prio A");
  3653. 3653
  3654. 3654 /*
  3655. 3655 * Setup and activate an LTE carrier.
  3656. 3656 * carrierId = 0, port = A, axcId = 1
  3657. 3657 */
  3658. 3658 logger.addLogStep("Setup LTE carrier on branch " + AntennaBranchId.A);
  3659. 3659 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1);
  3660. 3660 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  3661. 3661 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  3662. 3662 logger.endLogStep();
  3663. 3663
  3664. 3664 logger.addLogStep("Activate LTE carrier on branch " + AntennaBranchId.A);
  3665. 3665 VerifyCarrierControl.verifyActivateAndActivated(dlLteCarrier, msiCarrierManager);
  3666. 3666 logger.endLogStep();
  3667. 3667
  3668. 3668 logger.addLogStep("Verify EVC SBPS state");
  3669. 3669 MemMappedCommand xenon = radioUnit.coli().memMapped().xenon();
  3670. 3670 TxmSbpsDumpInfo txmSbpsDump = radioUnit.coli().txm().sbps().dump(AntennaBranchId.A);
  3671. 3671 if (txmSbpsDump.isSbpsCapable()) {
  3672. 3672 if (txmSbpsDump.getCurrentState().equals(SBPSState.ENABLED)) {
  3673. 3673 VerifySbps.verifyEvcSbpsConfRegister(PWR_SYNC_A_MSG_TO_0, xenon);
  3674. 3674 } else {
  3675. 3675
  3676. 3676 logger.info("failed to enable sbps, can't verify G2 SBPS config register.");
  3677. 3677 }
  3678. 3678 } else {
  3679. 3679 logger.info("not sbps capable radio, no need to verify G2 SBPS config register.");
  3680. 3680 }
  3681. 3681 logger.endLogStep();
  3682. 3682
  3683. 3683 logger.addLogStep("Deactivate and releasing LTE carrier for branch " + AntennaBranchId.A);
  3684. 3684 VerifyCarrierControl.verifyDeactivateAndReleaseCarrier(dlLteCarrier, msiCarrierManager);
  3685. 3685 logger.endLogStep();
  3686. 3686
  3687. 3687 }
  3688. 3688
  3689. 3689 /**
  3690. 3690 * SBPS helper to establish an connection, setup and activate an LTE carrier.
  3691. 3691 *
  3692. 3692 * @Param ratType LTE-TDD or LTE-FDD ratType is used.
  3693. 3693 * @Return carrier if success else null.
  3694. 3694 */
  3695. 3695 private Carrier connectSetupActivatedLteTxCarrier(RatType ratType) {
  3696. 3696
  3697. 3697 msiClient = stp.defaultDigitalUnit().getMsiClient();
  3698. 3698 ConnSetupUtils.open(msiClient);
  3699. 3699 msiCarrierManager = CarrierManagementFactory.getCarrierManagement(msiClient);
  3700. 3700
  3701. 3701 /*
  3702. 3702 * carrierId = 0, port = A, axcId = 1
  3703. 3703 */
  3704. 3704 logger.addLogStep("Setup, create and activate LTE carrier");
  3705. 3705 dlLteCarrier = createLteTxCarrier(0, RF_PORT_ID_A, 1, ratType);
  3706. 3706 Assert.assertNotNull(dlLteCarrier, "LTE carrier couldn't be created");
  3707. 3707 Assert.assertTrue(msiCarrierManager.setupCarrier(dlLteCarrier));
  3708. 3708 Assert.assertTrue(msiCarrierManager.activateCarrier(dlLteCarrier));
  3709. 3709 logger.endLogStep();
  3710. 3710 return dlLteCarrier;
  3711. 3711 }
  3712. 3712
  3713. 3713 /**
  3714. 3714 * SBPS helper to establish an connection, setup and activate an GSM carrier.
  3715. 3715 */
  3716. 3716 private Carrier connectSetupActivatedGsmTxCarrier() {
  3717. 3717
  3718. 3718 msiClient = stp.defaultDigitalUnit().getMsiClient();
  3719. 3719 ConnSetupUtils.open(msiClient);
  3720. 3720 msiCarrierManager = CarrierManagementFactory.getCarrierManagement(msiClient);
  3721. 3721
  3722. 3722 /*
  3723. 3723 * carrierId = 0, port = A, axcId = 1
  3724. 3724 */
  3725. 3725 logger.addLogStep("Setup, create and activate GSM carrier");
  3726. 3726 Carrier dlGsmCarrier = createGsmTxCarrier(0, RF_PORT_ID_A, 1);
  3727. 3727 Assert.assertNotNull(dlGsmCarrier, "GSM carrier couldn't be created");
  3728. 3728 Assert.assertTrue(msiCarrierManager.setupCarrier(dlGsmCarrier));
  3729. 3729 Assert.assertTrue(msiCarrierManager.activateCarrier(dlGsmCarrier));
  3730. 3730 logger.endLogStep();
  3731. 3731 return dlGsmCarrier;
  3732. 3732 }
  3733. 3733
  3734. 3734 /**
  3735. 3735 * SBPS helper method to create a LTE Tx carrier.
  3736. 3736 *
  3737. 3737 * @Param carrierId The selected carrier id.
  3738. 3738 * @Param rfPortId The selected rfPort.
  3739. 3739 * @Param axcId The selected axcId.
  3740. 3740 * @Param RatType LTE-TDD or LTE-FDD ratType is used
  3741. 3741 * @Return carrier if success else null.
  3742. 3742 */
  3743. 3743 private Carrier createLteTxCarrier(int carrierId, int rfPortId, int axcId, RatType ratType) {
  3744. 3744
  3745. 3745 if (rfPortId > msiClient.getRadioResources().getRuRfPortHandler().getNumberOfRfPorts()) {
  3746. 3746 info("selected rfPort is not supported");
  3747. 3747 return null;
  3748. 3748 }
  3749. 3749
  3750. 3750 RfPort rfPort = msiClient.getRadioResources().getRuRfPortHandler().getRfPort(rfPortId);
  3751. 3751
  3752. 3752 Carrier carrier = CarrierUtils.createCarrier(
  3753. 3753 msiClient,
  3754. 3754 rfPort,
  3755. 3755 LinkDirection.DL,
  3756. 3756 ratType);
  3757. 3757
  3758. 3758 /*
  3759. 3759 * Update the LTE carrier with specific information needed by SBPS tests
  3760. 3760 */
  3761. 3761 carrier.setCarrierID(carrierId);
  3762. 3762 carrier.setSampleRate(CarrierType.getSampleRate(ratType,
  3763. 3763 CarrierConstants.CARRIER_BANDWIDTH_5000.getValue(), LinkDirection.DL).inKhz());
  3764. 3764
  3765. 3765 // this is the case in TC C2,TC4 when LTE-TDD carrier is supported
  3766. 3766 if ((RatType.LTE_TDD == ratType) && (RF_PORT_ID_B == rfPortId)) {
  3767. 3767 carrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(ratType).get(0)
  3768. 3768 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  3769. 3769
  3770. 3770 } else {
  3771. 3771 carrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(ratType).get(0)
  3772. 3772 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue() / 2);
  3773. 3773 }
  3774. 3774 carrier.setBandwidth(Carrier.CarrierConstants.CARRIER_BANDWIDTH_5000.getValue());
  3775. 3775 carrier.setTxCarrierGainSetting(Carrier.CarrierConstants.TX_CARRIER_GAIN_SETTING_QUARTER_POWER.getValue());
  3776. 3776 carrier.setTxCarrierPowerAllocation(Carrier.CarrierConstants.TX_CARRIER_GAIN_SETTING_QUARTER_POWER.getValue());
  3777. 3777 carrier.setSubBandFunction(Const_dc_tr.DC_TR_SUB_BAND_FUNCTION_OFF);
  3778. 3778 carrier.setAxcId(axcId);
  3779. 3779
  3780. 3780 return carrier;
  3781. 3781
  3782. 3782 }
  3783. 3783
  3784. 3784 private Carrier createLteTxCarrier(int carrierId, int rfPortId, int axcId) {
  3785. 3785 Carrier carrier = createLteTxCarrier(carrierId, rfPortId, axcId, RatType.LTE_FDD);
  3786. 3786 return carrier;
  3787. 3787 }
  3788. 3788
  3789. 3789 /**
  3790. 3790 * SBPS helper method to create a GSM Tx carrier.
  3791. 3791 *
  3792. 3792 * @Param carrierId The selected carrier id.
  3793. 3793 * @Param rfPortId The selected rfPort.
  3794. 3794 * @Param axcId The selected axcId.
  3795. 3795 * @Return carrier if success else null.
  3796. 3796 */
  3797. 3797 private Carrier createGsmTxCarrier(int carrierId, int rfPortId, int axcId) {
  3798. 3798
  3799. 3799 if (rfPortId > msiClient.getRadioResources().getRuRfPortHandler().getNumberOfRfPorts()) {
  3800. 3800 info("selected rfPort is not supported");
  3801. 3801 return null;
  3802. 3802 }
  3803. 3803
  3804. 3804 RfPort rfPort = msiClient.getRadioResources().getRuRfPortHandler().getRfPort(rfPortId);
  3805. 3805 Carrier carrier = CarrierUtils.createCarrier(
  3806. 3806 msiClient,
  3807. 3807 rfPort,
  3808. 3808 LinkDirection.DL,
  3809. 3809 RatType.GSM);
  3810. 3810
  3811. 3811 /*
  3812. 3812 * Update the GSM carrier with specific information needed by SBPS tests
  3813. 3813 */
  3814. 3814 carrier.setCarrierID(carrierId);
  3815. 3815 carrier.setSampleRate(CarrierType.getSampleRate(RatType.GSM,
  3816. 3816 CarrierConstants.DEFAULT_CARRIER_BANDWIDTH_GSM.getValue(), LinkDirection.DL).inKhz());
  3817. 3817 carrier.setFrequency(StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3818. 3818 .getTxOperationBandLowEdge() + Carrier.CarrierConstants.CARRIER_BANDWIDTH_10000.getValue());
  3819. 3819 carrier.setBandwidth(Carrier.CarrierConstants.DEFAULT_CARRIER_BANDWIDTH_GSM.getValue());
  3820. 3820 carrier.setTxCarrierGainSetting(Carrier.CarrierConstants.TX_CARRIER_GAIN_SETTING_QUARTER_POWER.getValue());
  3821. 3821 carrier.setTxCarrierPowerAllocation(Carrier.CarrierConstants.TX_CARRIER_GAIN_SETTING_QUARTER_POWER.getValue());
  3822. 3822 carrier.setSubBandFunction(Const_dc_tr.DC_TR_SUB_BAND_FUNCTION_OFF);
  3823. 3823 ArfcnRange arfcnRange0 = StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.GSM).get(0)
  3824. 3824 .getArfcnRanges().get(0);
  3825. 3825 /*
  3826. 3826 * Carrier frequency for GSM is calculated from ARFCN number which needs to be adjusted
  3827. 3827 * accordingly. Minimum ARFCN number used to setup carrier in the low edge of the frequency
  3828. 3828 * band thus needs to be increased in order to setup carrier 10 MHz away from the band low
  3829. 3829 * edge as stated above.
  3830. 3830 * Offset used (50) translated into frequency will give 50*200kHz(carrier BW)= 10 MHz
  3831. 3831 */
  3832. 3832 carrier.setArfcnMin(arfcnRange0.getArfcnMin() + 50);
  3833. 3833 carrier.setArfcnMax(arfcnRange0.getArfcnMin() + 50);
  3834. 3834 carrier.setAxcId(axcId);
  3835. 3835
  3836. 3836 return carrier;
  3837. 3837
  3838. 3838 }
  3839. 3839
  3840. 3840 /**
  3841. 3841 * SBPS helper method to create and setup a Tx WcdmaCarrier.
  3842. 3842 *
  3843. 3843 * @Param carrierId The selected carrier id.
  3844. 3844 * @Param rfPortId The selected rfPort.
  3845. 3845 * @Param axcId The selected axcId.
  3846. 3846 * @Return WcdmaCarrier if success else null.
  3847. 3847 */
  3848. 3848 private WcdmaCarrier createAndSetupWcdmaTxCarrier(int carrierId, int rfPortId, int axcId) {
  3849. 3849
  3850. 3850 if (rfPortId > wcdmaClient.getRadioResources().getRuRfPortHandler().getNumberOfRfPorts()) {
  3851. 3851 info("selected rfPort is not supported");
  3852. 3852 return null;
  3853. 3853 }
  3854. 3854
  3855. 3855 RfPort rfPort = wcdmaClient.getRadioResources().getRuRfPortHandler().getRfPort(rfPortId);
  3856. 3856 WcdmaCarrier carrier = (WcdmaCarrier) CarrierUtils.createCarrier(wcdmaClient,
  3857. 3857 carrierId, rfPort, LinkDirection.DL, RatType.WCDMA);
  3858. 3858
  3859. 3859 /*
  3860. 3860 * Configure the BaseBand data, more details about allocation of
  3861. 3861 * PortId and CellCarrierBranchIdcan be found in
  3862. 3862 * 42/102 62-CNH 160 6510 and 1/1551-HRB 105 102/1
  3863. 3863 */
  3864. 3864 if (rfPortId == RF_PORT_ID_B) {
  3865. 3865 /* branch B was created on RF_PORT B */
  3866. 3866 carrier.getBasebandConfig().setSlotIdDl(2);
  3867. 3867 carrier.getBasebandConfig().setPortIdDl(5);
  3868. 3868 carrier.getBasebandConfig().setDlCellCarrierBranchId(2);
  3869. 3869 carrier.getBasebandConfig().setAxcIdDl(axcId);
  3870. 3870 } else {
  3871. 3871 /* branch A was created on RF_PORT A */
  3872. 3872 carrier.getBasebandConfig().setSlotIdDl(1);
  3873. 3873 carrier.getBasebandConfig().setPortIdDl(1);
  3874. 3874 carrier.getBasebandConfig().setDlCellCarrierBranchId(1);
  3875. 3875 carrier.getBasebandConfig().setAxcIdDl(axcId);
  3876. 3876 }
  3877. 3877
  3878. 3878 Assert.assertTrue(WcdmaBasebandConfigurationUtils.getInstance().configureBasebandData(wcdmaClient, carrier));
  3879. 3879 Assert.assertTrue(wcdmaCarrierManager.setupCarrier(carrier));
  3880. 3880
  3881. 3881 return carrier;
  3882. 3882 }
  3883. 3883
  3884. 3884 /**
  3885. 3885 * SBPS helper method to release a WCDMA carrier.
  3886. 3886 *
  3887. 3887 * @Param WcdmaCarrier The carrier to be released.
  3888. 3888 * @Param tpaId The selected TpaId to turn off.
  3889. 3889 * @Return true if success, else false.
  3890. 3890 */
  3891. 3891 private boolean releaseWcdmaCarrier(WcdmaCarrier carrier, int tpaId) {
  3892. 3892
  3893. 3893 if (!wcdmaCarrierManager.releaseCarrier(carrier)) {
  3894. 3894 return false;
  3895. 3895 }
  3896. 3896
  3897. 3897 ProcedureResult tpaResult = wcdmaClient.tpa().getDevice(tpaId).off();
  3898. 3898 if (tpaResult.getVerdict() != Verdict.PASS) {
  3899. 3899 return false;
  3900. 3900 }
  3901. 3901
  3902. 3902 Assert.assertTrue(WcdmaBasebandConfigurationUtils.getInstance().clearBasebandData(wcdmaClient, carrier));
  3903. 3903
  3904. 3904 return true;
  3905. 3905 }
  3906. 3906
  3907. 3907 /**
  3908. 3908 * SBPS helper method to set the TPA power to it's lowest supported level.
  3909. 3909 *
  3910. 3910 * @Param branch The selected branch to get power class.
  3911. 3911 * @Param tpaId The selected tpaId.
  3912. 3912 * @Return true if success, else false.
  3913. 3913 */
  3914. 3914 private boolean setWcdmaTpaModifyPower(AntennaBranchId branch, int tpaId) {
  3915. 3915 /*
  3916. 3916 * Get low and high frequency and convert to 5kHz unit
  3917. 3917 */
  3918. 3918 int highFreqBandEdge = StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.WCDMA).get(0)
  3919. 3919 .getTxOperationBandHighEdge() * 5 / 1000;
  3920. 3920 int lowFreqBandEdge = StaticInfo.getInstance().getRuInfo().getRu().getConfiguredBands(RatType.WCDMA).get(0)
  3921. 3921 .getTxOperationBandLowEdge() * 5 / 1000;
  3922. 3922 int lastPowerClass = radioUnit.coli().txm().pa().getSupportedPowerClasses(branch).size();
  3923. 3923
  3924. 3924 /*
  3925. 3925 * Make sure we have at least one supported power class
  3926. 3926 */
  3927. 3927 if (lastPowerClass < 1) {
  3928. 3928 return false;
  3929. 3929 }
  3930. 3930
  3931. 3931 /*
  3932. 3932 * Get the lowest power class level corresponding to the last supported
  3933. 3933 * power class and set it in the TPA device.
  3934. 3934 */
  3935. 3935 int lowestPowerClassLevel = radioUnit.coli().txm().pa()
  3936. 3936 .getSupportedPowerClasses(branch).get(lastPowerClass - 1);
  3937. 3937
  3938. 3938 ProcedureResult modResult = wcdmaClient.tpa().getDevice(tpaId).modifyPower(
  3939. 3939 new UserOptions().sendParameters(new Parameters()
  3940. 3940 .add("totalOutputPower", lowestPowerClassLevel)));
  3941. 3941
  3942. 3942 if (modResult.getVerdict() != Verdict.PASS) {
  3943. 3943 return false;
  3944. 3944 }
  3945. 3945
  3946. 3946 ProcedureResult setupResult = wcdmaClient.tpa().getDevice(tpaId).setup3(
  3947. 3947 new UserOptions().sendParameters(new Parameters()
  3948. 3948 .add("numberOfCarriers", 1)
  3949. 3949 .add("maxPowerConsumption", 440)
  3950. 3950 .add("lowFreqBandEdge", lowFreqBandEdge)
  3951. 3951 .add("highFreqBandEdge", highFreqBandEdge)));
  3952. 3952
  3953. 3953 if (setupResult.getVerdict() != Verdict.PASS) {
  3954. 3954 return false;
  3955. 3955 }
  3956. 3956
  3957. 3957 return true;
  3958. 3958
  3959. 3959 }
  3960. 3960
  3961. 3961 /**
  3962. 3962 * SBPS helper method to skip if radio has slow pa.
  3963. 3963 */
  3964. 3964 private void skipIfSlowPa(Carrier carrier) {
  3965. 3965 if (!radioUnit.coli().txm().sbps().dump(AntennaBranchId.A).isSbpsCapable()) {
  3966. 3966 logger.addLogStep("SkipIfSlowPa: Releasing " + carrier.getRatType().toString() + " carrier ");
  3967. 3967 msiCarrierManager.releaseCarrier(carrier);
  3968. 3968 logger.endLogStep();
  3969. 3969 /*
  3970. 3970 * Clearing the PA_ON_EVENT
  3971. 3971 * Since we don't want to wait 20 seconds for PA to timeout
  3972. 3972 */
  3973. 3973 radioUnit.coli().fm().clear(Fault.PA_ON_EVENT);
  3974. 3974 ElvisAssert.skip("Skipping since radio isn't SBPS capable due to slow pa.");
  3975. 3975 }
  3976. 3976 }
  3977. 3977 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement