Folks,
I am adding a test case for testing the call to Mesos SHUTDOWN. For that I
replaced Mesos with V1Mesos in VersionedSchedulerDriverServiceTest.java. It
fails as follows:



...
    if(v1) {
      mesos = createMock(*V1Mesos.class*);
    } else {
      mesos = createMock(Mesos.class);
    }

@Test
  public void testShutdown() {
    expectStart(true);
    
expect(storage.schedulerStore.fetchFrameworkId()).andReturn(Optional.of(FRAMEWORK_ID));

    Capture<Call> shutCapture = createCapture();
    mesos.send(capture(shutCapture));
    expectLastCall().once();

    control.replay();
    driverService.startAsync().awaitRunning();
    driverService.registered(new PubsubEvent.DriverRegistered());

    *driverService.killTask("task-id", "agent-id");*

    assertTrue(shutCapture.hasCaptured());
    Call shutCaptureValue = shutCapture.getValue();
    assertEquals(shutCaptureValue.getFrameworkId().getValue(), FRAMEWORK_ID);
    assertEquals(shutCaptureValue.getType(), Call.Type.SHUTDOWN);
    assertEquals(shutCaptureValue.getShutdown().getExecutorId().getValue(),
"task-id");
    assertEquals(shutCaptureValue.getShutdown().getAgentId().getValue(),
"agent-id");
  }

*java.lang.UnsatisfiedLinkError: no mesos in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)*
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1122)
        at org.apache.mesos.MesosNativeLibrary.load(MesosNativeLibrary.java:163)
        at org.apache.mesos.MesosNativeLibrary.load(MesosNativeLibrary.java:188)
        at org.apache.mesos.v1.scheduler.*V1Mesos*.<clinit>(V1Mesos.java:47)

Reply via email to