@@ -198,11 +198,13 @@ public void testMinorUpgradeDowngradeException() {
198198 execAndGetActionBuild (compUnTill .clone (env .getUnTillVer ().toRelease ()));
199199 fail ();
200200 } catch (EMinorUpgradeDowngrade e ) {
201- if (!e .getRootComp ().equals (compUBL .clone (crbUBL .getVersion ().toPreviousPatch ())) &&
202- e .getRootComp ().equals (compUBL .clone (crbUnTill .getVersion ().toPreviousPatch ()))) {
201+ if (e .getRootComp ().equals (compUBL .clone (crbUBL .getVersion ().toPreviousPatch ()))) {
202+ assertEquals (compUnTillDb .clone ("2.59.0" ), e .getProblematicMDep ());
203+ } else if (e .getRootComp ().equals (compUBL .clone (crbUnTill .getVersion ().toPreviousPatch ()))) {
204+ assertEquals (compUnTillDb .clone ("2.60.0" ), e .getProblematicMDep ());
205+ } else {
203206 fail ();
204207 }
205- assertEquals (compUnTillDb .clone ("2.59.0" ), e .getProblematicMDep ());
206208 }
207209 }
208210
@@ -226,11 +228,13 @@ public void testPatchDowngradeException() {
226228 execAndGetActionBuild (compUnTill .clone (env .getUnTillVer ().toRelease ()));
227229 fail ();
228230 } catch (EMinorUpgradeDowngrade e ) {
229- if (!e .getRootComp ().equals (compUBL .clone (crbUBL .getVersion ().toPreviousPatch ())) &&
230- e .getRootComp ().equals (compUBL .clone (crbUnTill .getVersion ().toPreviousPatch ()))) {
231+ if (e .getRootComp ().equals (compUBL .clone (crbUBL .getVersion ().toPreviousPatch ()))) {
232+ assertEquals (compUnTillDb .clone ("2.59.1" ), e .getProblematicMDep ());
233+ } else if (e .getRootComp ().equals (compUBL .clone (crbUnTill .getVersion ().toPreviousPatch ()))) {
234+ assertEquals (compUnTillDb .clone ("2.59.0" ), e .getProblematicMDep ());
235+ } else {
231236 fail ();
232237 }
233- assertEquals (compUnTillDb .clone (crbUnTillDb .getVersion ()), e .getProblematicMDep ());
234238 }
235239 }
236240}
0 commit comments