Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

371
Vistas
why embedded mongo process not stoping by mongodExecutable.stop()?

Embedded mongo started successful with below code,,but not stoping by mongodExecutable.stop(),this suppose to stop the running mongo. what can be the issue, The below code

 public class Test
       {
 private static final String CONNECTION_STRING = "mongodb://%s:%d";

    private static MongodExecutable mongodExecutable;
    ObjectMapper mapper = new ObjectMapper();
    private static MongodProcess mongod = null;
   

    @After
   public void clean() {
        //mongodExecutable.stop();
        if(mongod.isProcessRunning()) {
        //mongod.stopInternal();
        mongodExecutable.stop();
    }}

    @Before
   public void setup() throws Exception {
        String ip = "localhost";
        int port = 27017;
        

        IMongodConfig mongodConfig = new MongodConfigBuilder().version(Version.Main.PRODUCTION)
            .net(new Net(ip, port, Network.localhostIsIPv6()))
            .build();

        MongodStarter starter = MongodStarter.getDefaultInstance();
        mongodExecutable = starter.prepare(mongodConfig);
        mongod=mongodExecutable.start();
    }

    @Test
    public void testfeature() throws Exception {
         assertEquals(1, 1);
       
        
    }
 }
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda