You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aurora.apache.org by Mohit Jaggi <mo...@uber.com> on 2018/02/02 00:45:44 UTC
Re: testing SHUTDOWN call with V1Mesos, native library missing
Appreciate any pointers to fix this.
On Tue, Jan 23, 2018 at 1:37 PM, Mohit Jaggi <mo...@uber.com> wrote:
> 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)
>
>