Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix STF after migration to new resource implementation (ref-point migration 9/10) #1040

Merged
merged 5 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import saros.stf.client.tester.SarosTester;
import saros.stf.client.util.EclipseTestThread;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class EditDuringInvitationStressTest extends StfTestCase {
Expand All @@ -39,7 +39,8 @@ public void testEditMultipleClassesDuringInvitation() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, CLASS_NAMES);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

BOB.superBot()
.views()
Expand All @@ -50,6 +51,8 @@ public void testEditMultipleClassesDuringInvitation() throws Exception {

ALICE.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

bobIsWriting =
Expand All @@ -75,7 +78,7 @@ private char generateCharacter() {

bobIsWriting.start();

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

bobIsWriting.join();
bobIsWriting.verify();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public void testEditDuringInvitation() throws Exception {
.selectClass(Constants.PROJECT1, Constants.PKG1, Constants.CLS1)
.open();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

EclipseTestThread bobIsWriting =
Expand All @@ -58,7 +60,7 @@ public void run() throws Exception {

bobIsWriting.start();

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

bobIsWriting.join();
bobIsWriting.verify();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public void testEditDuringInvitationNonHostInvites() throws Exception {
.selectClass(Constants.PROJECT1, Constants.PKG1, Constants.CLS1)
.open();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

aliceIsWriting =
Expand All @@ -61,7 +63,7 @@ public void run() throws Exception {

aliceIsWriting.start();

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

aliceIsWriting.join();
aliceIsWriting.verify();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import static saros.stf.client.tester.SarosTester.BOB;
import static saros.stf.client.tester.SarosTester.CARL;
import static saros.stf.shared.Constants.ACCEPT;
import static saros.stf.shared.Constants.SHELL_ADD_PROJECTS;
import static saros.stf.shared.Constants.SHELL_ADD_RESOURCES;
import static saros.stf.shared.Constants.SHELL_SESSION_INVITATION;

import org.junit.BeforeClass;
Expand Down Expand Up @@ -36,7 +36,7 @@ public void testModifyDocumentBeforeProjectNegotiation() throws Exception {

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS);
CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES);

// this test will fail if a jupiter proxy is added when bob is typing
// text now
Expand All @@ -50,7 +50,9 @@ public void testModifyDocumentBeforeProjectNegotiation() throws Exception {

BOB.controlBot().getNetworkManipulator().synchronizeOnActivityQueue(ALICE.getJID(), 10000);

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

CARL.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import saros.stf.client.StfTestCase;
import saros.stf.client.util.EclipseTestThread;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;

public class EditDifferentFilesTest extends StfTestCase {

Expand All @@ -33,7 +33,7 @@ public void testEditingOnDifferentFiles() throws Exception {
.newC()
.javaProjectWithClasses("foo", "bar", "HelloWorld");

Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

BOB.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import saros.stf.annotation.TestLink;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;

@TestLink(id = "Saros-108_add_3_new_projects_to_a_existing_session")
public class Editing3ProjectsTest extends StfTestCase {
Expand All @@ -30,15 +30,15 @@ public void testEditing3Projects() throws Exception {
ALICE.superBot().internal().createFile("foo1", "src/bar/HelloBob.java", "HelloBob");
ALICE.superBot().internal().createFile("foo2", "src/bar/HelloCarl.java", "HelloCarl");

Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo");

Util.addProjectToSessionSequentially("foo1", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.addJavaProjectToSessionSequentially("foo1", ALICE, BOB);

BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo1");

Util.addProjectToSessionSequentially("foo2", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.addJavaProjectToSessionSequentially("foo2", ALICE, BOB);

BOB.superBot().views().packageExplorerView().waitUntilResourceIsShared("foo2");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import saros.stf.annotation.TestLink;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;

@TestLink(id = "Saros-40_followmode_and_refactoring")
public class RefactorInFollowModeTest extends StfTestCase {
Expand Down Expand Up @@ -45,7 +45,7 @@ public void testRefactorInFollowMode() throws Exception {

ALICE.remoteBot().editor("HelloWorld.java").closeWithSave();

Util.buildSessionSequentially("foo", TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject("foo", SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

BOB.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.junit.Test;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class AwarenessInformationVisibleAfterInvitationTest extends StfTestCase {
Expand Down Expand Up @@ -57,7 +57,8 @@ public void awarenessInformationVisibleNewSessionTest() throws Exception {
.packageExplorerView()
.selectFile(Constants.PROJECT1, Constants.FILE1)
.open();
Util.buildSessionConcurrently(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB);
BOB.superBot()
.views()
.packageExplorerView()
Expand Down Expand Up @@ -113,7 +114,8 @@ public void awarenessInformationVisableAddToSessionTest() throws Exception {
.packageExplorerView()
.selectFile(Constants.PROJECT1, Constants.FILE1)
.open();
Util.buildSessionConcurrently(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB);
BOB.superBot()
.views()
.packageExplorerView()
Expand All @@ -127,9 +129,11 @@ public void awarenessInformationVisableAddToSessionTest() throws Exception {

ALICE.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

CARL.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import saros.session.User.Permission;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class NonHostInvitesContactTest extends StfTestCase {
Expand Down Expand Up @@ -69,7 +69,8 @@ public void AliceInvitesBobAndBobInvitesCarlTest() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

assertTrue(BOB.superBot().views().sarosView().isInSession());
assertTrue(ALICE.superBot().views().sarosView().isInSession());
Expand All @@ -81,9 +82,11 @@ public void AliceInvitesBobAndBobInvitesCarlTest() throws Exception {

BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

CARL.superBot()
.views()
Expand All @@ -104,7 +107,8 @@ public void CarlTypesAndEverybodyGetsCarlsTextTest() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

assertTrue(BOB.superBot().views().sarosView().isInSession());
assertTrue(ALICE.superBot().views().sarosView().isInSession());
Expand All @@ -116,9 +120,11 @@ public void CarlTypesAndEverybodyGetsCarlsTextTest() throws Exception {

BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

CARL.superBot()
.views()
Expand Down Expand Up @@ -175,7 +181,8 @@ public void NonHostBobInvitesCarlAndLeavesTest() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

assertTrue(BOB.superBot().views().sarosView().isInSession());
assertTrue(ALICE.superBot().views().sarosView().isInSession());
Expand All @@ -187,9 +194,11 @@ public void NonHostBobInvitesCarlAndLeavesTest() throws Exception {

BOB.superBot().views().sarosView().selectContact(CARL.getJID()).addToSarosSession();

CARL.superBot().internal().createJavaProject(Constants.PROJECT1);

CARL.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.superBot().confirmShellAddProjectWithNewProject(Constants.PROJECT1);
CARL.superBot().confirmShellAddProjectUsingExistProject(Constants.PROJECT1);

CARL.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import static saros.stf.client.tester.SarosTester.CARL;
import static saros.stf.client.tester.SarosTester.DAVE;
import static saros.stf.shared.Constants.ACCEPT;
import static saros.stf.shared.Constants.SHELL_ADD_PROJECTS;
import static saros.stf.shared.Constants.SHELL_ADD_RESOURCES;
import static saros.stf.shared.Constants.SHELL_INVITATION_CANCELED;
import static saros.stf.shared.Constants.SHELL_SESSION_INVITATION;

Expand Down Expand Up @@ -106,9 +106,9 @@ public void parallelInvitationWithTerminationByHost()
DAVE.remoteBot().shell(SHELL_SESSION_INVITATION).activate();
DAVE.remoteBot().shell(SHELL_SESSION_INVITATION).confirm(ACCEPT);

CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS);
CARL.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES);

DAVE.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_PROJECTS);
DAVE.remoteBot().waitLongUntilShellIsOpen(SHELL_ADD_RESOURCES);

// stop the session

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import saros.session.User.Permission;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class Share2UsersSequentiallyTest extends StfTestCase {
Expand Down Expand Up @@ -45,7 +45,8 @@ public void testAliceShareProjectWithBobSequentially() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

assertTrue(BOB.superBot().views().sarosView().isInSession());
assertTrue(ALICE.superBot().views().sarosView().isInSession());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import saros.session.User.Permission;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class Share3UsersConcurrentlyTest extends StfTestCase {
Expand Down Expand Up @@ -57,8 +57,8 @@ public void testShareProjectConcurrently() throws Exception, InterruptedExceptio
.tree()
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);
Util.buildSessionConcurrently(
Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB, CARL);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.CONCURRENTLY, ALICE, BOB, CARL);

BOB.superBot()
.views()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.junit.Test;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class Share3UsersLeavingSessionTest extends StfTestCase {
Expand Down Expand Up @@ -54,7 +54,8 @@ public void testShare3UsersLeavingSession() throws Exception {
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, BOB);

assertTrue(BOB.superBot().views().sarosView().isInSession());
assertTrue(ALICE.superBot().views().sarosView().isInSession());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import saros.session.User.Permission;
import saros.stf.client.StfTestCase;
import saros.stf.client.util.Util;
import saros.stf.shared.Constants.TypeOfCreateProject;
import saros.stf.shared.Constants.SessionInvitationModality;
import saros.stf.test.stf.Constants;

public class Share3UsersSequentiallyTest extends StfTestCase {
Expand Down Expand Up @@ -57,8 +57,8 @@ public void testShareProject3UsersSequentially() throws Exception, InterruptedEx
.newC()
.javaProjectWithClasses(Constants.PROJECT1, Constants.PKG1, Constants.CLS1);

Util.buildSessionSequentially(
Constants.PROJECT1, TypeOfCreateProject.NEW_PROJECT, ALICE, CARL, BOB);
Util.setUpSessionWithJavaProject(
Constants.PROJECT1, SessionInvitationModality.SEQUENTIALLY, ALICE, CARL, BOB);

BOB.superBot()
.views()
Expand Down
Loading