- "Write tests. Not too many. Mostly integration."
- Integration tests strike a great balance on the trade-offs between confidence and speed/expense. This is why it's advisable to spend most (not all, mind you) of your effort there.
- biggest thing you can do to write more integration tests is to stop mocking so much stuff
- When you mock something you're removing all confidence in the integration between what you're testing and what's being mocked.
Hi all, I managed to do what you want but only in hacky way:
val initStarted = new AtomicBoolean(false)
val initCompleteLatch = new CountDownLatch(1)
scenario("myScenario")
.doIf(_ => initStarted.getAndSet(true) == false) {
exec(http("first")
.get("/endpoint")
.check(status.is(200),
jsonPath("$..response.id").findAll.saveAs("reponseVariable")
)
).exec { session =>
reponseVariable = session("reponseVariable").as[String]
initCompleteLatch.countDown()
session
}
}
.exec { session =>
initCompleteLatch.await()
session.set("reponseVariable", reponseVariable)
}
.exec(http("second")
.post("/another/endpoint/{responseVariable}")
.body(...)
.check(status.is(200))
)
Hope it helps :) It can chain serveral requests, passthrough response along, and ensures first request is send only once.
The interactive rebase command was originally designed to handle individual patch series. As such, it makes sense to exclude merge commits from the todo list, as the developer may have merged the then-current master while working on the branch, only to rebase all the commits onto master eventually (skipping the merge commits).
Start Time is the time from start of 1st request until the start of this request.
End Time is the time from start of 1st request until the end of this response.
Latency is the time from end of this request until the beginning of download of this response.
Response Time is the time from start of 1st request until the beginning of download of this response.
Duration is the time from start of this request until the end of this response.
It is not a JDBC driver error but a configuration needed for Oracle database instance running inside a Docker container.
You need to change $ORACLE_HOME/network/admin/sqlnet.ora append DISABLE_OOB=ON at end of file
"exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg -execute -if '$previewimage' -b -previewimage -w %d%f_%ue.jpg -execute -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original -common_args --ext jpg DIR
[Advanced] Extract JpgFromRaw or PreviewImage from all but JPG files in DIR, saving them with file names like image_EXT.jpg, then add all meta information from the original files to the extracted images. Here, the command line is broken into three sections (separated by -execute options), and each is executed as if it were a separate command. The -common_args option causes the --ext jpg DIR arguments to be applied to all three commands, and the -srcfile option allows the extracted JPG image to be the source file for the third command (whereas the RAW files are the source files for the other two commands).'
So to map your files with user id 1001 in /mnt/wrong to /mnt/correct with user id 1234, run this command:
sudo bindfs --map=1001/1234 /mnt/wrong /mnt/correct
function createHandler(handler: typeof Handler, params: string[]) {
var obj = new handler(params);
return obj;
}
var h = createHandler(Handler, ['hi', 'bye']);
Postgres allows:
UPDATE dummy
SET customer=subquery.customer,
address=subquery.address,
partn=subquery.partn
FROM (SELECT address_id, customer, address, partn
FROM /* big hairy SQL */ ...) AS subquery
WHERE dummy.address_id=subquery.address_id;
This syntax is not standard SQL
Currently adding a column to a table with a non-NULL default results in
a rewrite of the table. For large tables this can be both expensive and
disruptive. This patch removes the need for the rewrite as long as the
default value is not volatile. The default expression is evaluated at
the time of the ALTER TABLE and the result stored in a new column
(attmissingval) in pg_attribute, and a new column (atthasmissing) is set
to true. Any existing row when fetched will be supplied with the
attmissingval. New rows will have the supplied value or the default and
so will never need the attmissingval.
Instead to find where org.w3c.dom comes from I've been using this script:
mvn dependency:copy-dependencies -DincludeScope=test -DoutputDirectory=deps
for i in deps/*.jar; do if unzip -l $i| grep -q org.w3c.dom; then echo $i; fi ; done
go to settings > devices > keyboard
look for the keyboard shortcut for "Switch windows"
set this to the shortcut Alt+Tab (this will overwrite the old shortcut)
If you now press Alt+Tab you will be able to directly select all open windows without grouping into the different apps.
truncate -s 10G foo
fallocate -l 5G bar
It needs to be stated that truncate on a file system supporting sparse files will create a sparse file and fallocate will not
If all that fails, you can download and import the key manually:
curl 'http://pgp.surfnet.nl:11371/pks/lookup?op=get&search=0x38DBBDC86092693E' > gregkh.key
gpg --import gregkh.key
/PATTERN/,/^$/{/^$/d; p}
/PATTERN/,/^$/ match lines from PATTERN to empty line.
{/^$/d; p} remove (d) the lines being on ^$ format, print (p) the rest.
You can use the dialog enum values as keys, but they need to be computed properties:
let openDialogs: { [key in DialogType]?: Dialog } = {
[DialogType.Options]: undefined,
};
In things/index.js,
export {default as ThingA} from './ThingA'
export {default as ThingB} from './ThingB'
export {default as ThingC} from './ThingC'
Then to consume all the things elsewhere,
import * as things from './things'
CONFLICT (rename/rename): Rename "will-be-renamed.txt"->"new-name-1.txt" in branch "HEAD" rename "will-be-renamed.txt"->"new-name-2.txt" in "branch2"
Automatic merge failed; fix conflicts and then commit the result.
If you want to keep one file, say new-name-2.txt:
git add new-name-2.txt
git rm new-name-1.txt will-be-renamed.txt
git commit
What I usually do is, in Eclipse preferences, I define an Installed JRE called "JDK X.Y.Z" and include tools.jar as part of it libraries. Then I change the project preferences to use that JRE "JDK X.Y.Z".
To get the stack traces back, you need to pass the option -XX:-OmitStackTraceInFastThrow to the JVM.
The optimization is that when an exception (typically a NullPointerException) occurs for the first time, the full stack trace is printed and the JVM remembers the stack trace (or maybe just the location of the code). When that exception occurs often enough, the stack trace is not printed anymore, both to achieve better performance and not to flood the log with identical stack traces.
File file = new File("C:/PdfBox_Examples/new.pdf");
PDDocument document = PDDocument.load(file);
//Instantiate PDFTextStripper class
PDFTextStripper pdfStripper = new PDFTextStripper();
//Retrieving text from PDF document
String text = pdfStripper.getText(document);
CREATE TABLE books (
book_id serial NOT NULL,
data jsonb
);
INSERT INTO books VALUES (1, '{"title": "Sleeping Beauties", "genres": ["Fiction", "Thriller", "Horror"], "published": false}');
SELECT data->'title' AS title FROM books WHERE data->'published' = 'false';
CREATE INDEX idx_published ON books ((data->'published'));
text/html; vimprobtab.sh %s &; test=test -n "$DISPLAY"; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
The first entry tests that X is running, and if it is, it hands the file to vimprobable. The default, however, is determined by the copiousoutput tag. So, in mutt it is just a matter of hitting v to view the attached HTML and then m to send it to mailcap
select * from tbl TABLESAMPLE system (5)
The SYSTEM method is significantly faster than the BERNOULLI method when small sampling percentages are specified, but it may return a less-random sample of the table as a result of clustering effects.
Das Elterngeld-Netto wird berechnet, indem vom bereinigten Gesamtbrutto die Steuern und Sozialabgaben abgezogen werden. Die Steuerberechnung erfolgt dabei anhand eines modifizierten Programmablaufplans für die Ermittlung der Lohnsteuer. Für die Sozialabgaben hat der Gesetzgeber die Abzüge direkt in das Elterngeldgesetz aufgenommen. Sie betragen zusammen 21 Prozent des SV-Bruttos.
E. Pinheiro, W. Weber, and L. Barroso. Proceedings of the 5th USENIX Conference on File and Storage Technologies, page 2--2. Berkeley, CA, USA, USENIX Association, (2007)
T. Reps, S. Horwitz, and M. Sagiv. Proceedings of the 22Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, page 49--61. New York, NY, USA, ACM, (1995)