sebastianrothbucher commented on PR #6918:
URL: https://github.com/apache/nifi/pull/6918#issuecomment-1802690448
I don't think it was sth I did, specifically; it's just that Mongo might not
yet have committed the deletion of the DB in question. I nonetheless did two
things: 1.) use different test docs in different tests (which should not be
necessary but gives additoinal security). and 2.) add more deletion and an
explicit close to the Mongo write tests - which hopefully got this from 0.1% to
0.001% or sth
I re-ran the full test suite - and I have some other spurious errors. One in
GridFS I totally cannot explain (except somehow the CI overwrites the mongo
docker image - and we use another MongoDB on Github CI; just didn't see it).
The other issue is in GetMongoIT. We seem to overwrite flowfile attrs with
"environment variables". Looks to me the following change makes it a little
more stable. Didn't include it in the commit; maybe still useful
```
diff --git
a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java
b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java
index 87a0ca3d56..58e9adea6f 100644
---
a/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java
+++
b/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/GetMongoIT.java
@@ -502,10 +502,9 @@ public class GetMongoIT extends AbstractMongoIT {
db.getCollection(collections[x])
.insertOne(new Document().append("msg", "Hello, World"));
- Map<String, String> attrs = new HashMap<>();
- attrs.put("db", dbs[x]);
- attrs.put("collection", collections[x]);
- runner.enqueue(query, attrs);
+ runner.setEnvironmentVariableValue("db", dbs[x]);
+ runner.setEnvironmentVariableValue("collection",
collections[x]);
+ runner.enqueue(query);
runner.run();
db.drop();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]