Exemplo n.º 1
0
  static void start(final int count) {
    slowFactor = 0.5f;
    aborted = false;
    final int gx = 235;
    final int gy = 207;
    disableStonith();
    for (int i = count; i > 0; i--) {
      if (i % 5 == 0) {
        info("testA I: " + i);
      }
      checkTest("testA", 1);
      /* group with dummy resources */
      moveTo(gx, gy);
      sleep(1000);
      rightClick(); /* popup */
      sleep(1000);
      moveTo(Tools.getString("ClusterBrowser.Hb.AddGroup"));
      leftClick();
      sleep(3000);
      /* create dummy */
      moveTo(gx + 46, gy + 11);
      rightClick(); /* group popup */
      sleep(2000);
      moveTo(Tools.getString("ClusterBrowser.Hb.AddGroupService"));
      sleep(1000);
      moveTo("OCF Resource Agents");
      sleep(1000);
      typeDummy();
      sleep(300);
      setTimeouts(true);
      moveTo(Tools.getString("Browser.ApplyResource"));
      sleep(6000);
      leftClick();
      sleep(6000);
      checkTest("testA", 2);
      stopResource(gx, gy);
      sleep(6000);
      checkTest("testA", 3);

      /* copy/paste */
      moveTo(gx + 10, gy + 10);
      leftClick();
      robot.keyPress(KeyEvent.VK_CONTROL);
      press(KeyEvent.VK_C);
      press(KeyEvent.VK_V);
      robot.keyRelease(KeyEvent.VK_CONTROL);
      moveTo(gx + 10, gy + 90);
      leftClick();
      moveTo(Tools.getString("Browser.ApplyGroup"));
      sleep(4000);
      leftClick();
      checkTest("testA", 4);

      removeResource(gx, gy, CONFIRM_REMOVE);
      removeResource(gx, gy + 90, CONFIRM_REMOVE);
      resetTerminalAreas();
    }
    System.gc();
  }
Exemplo n.º 2
0
  static void start(final int count) {
    slowFactor = 0.3f;
    aborted = false;
    disableStonith();
    final String testName = "test3";
    for (int i = count; i > 0; i--) {
      if (i % 5 == 0) {
        info(testName + " I: " + i);
      }
      checkTest(testName, 1);
      /* filesystem/drbd */
      moveTo(577, 205);
      rightClick(); /* popup */
      sleep(1000);
      moveTo(Tools.getString("ClusterBrowser.Hb.AddService"));
      sleep(1000);
      moveTo("Filesystem + Linbit:DRBD");
      leftClick(); /* choose fs */

      moveTo("block device", Widget.MComboBox.class); /* choose drbd */
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo("mount point", Widget.MComboBox.class);
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo("filesystem type", Widget.MComboBox.class);
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_E);
      sleep(200);
      press(KeyEvent.VK_E);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo(Tools.getString("Browser.ApplyResource"));
      leftClick();
      sleep(2000);
      checkTest(testName, 2);
      checkNumberOfVertices(testName, 4);
      stopEverything();
      checkTest(testName, 3);
      removeEverything();
      resetTerminalAreas();

      /* filesystem/drbd - with name */
      moveTo(577, 205);
      rightClick(); /* popup */
      sleep(1000);
      moveTo(Tools.getString("ClusterBrowser.Hb.AddService"));
      sleep(1000);
      moveTo("Filesystem + Linbit:DRBD");
      leftClick(); /* choose fs */

      checkTest(testName, 4);
      moveTo("Name", Widget.MTextField.class);
      leftClick();
      press(KeyEvent.VK_X);
      sleep(200);
      press(KeyEvent.VK_Y);
      sleep(200);

      moveTo("block device", Widget.MComboBox.class); /* choose drbd */
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo("mount point", Widget.MComboBox.class);
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_DOWN);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo("filesystem type", Widget.MComboBox.class);
      leftClick();
      sleep(2000);
      press(KeyEvent.VK_E);
      sleep(200);
      press(KeyEvent.VK_E);
      sleep(200);
      press(KeyEvent.VK_ENTER);

      moveTo(Tools.getString("Browser.ApplyResource"));
      leftClick();
      sleep(2000);
      checkTest(testName, 5);
      checkNumberOfVertices(testName, 4);
      stopEverything();
      checkTest(testName, 6);
      removeEverything();
      resetTerminalAreas();
    }
    System.gc();
  }