Title: Dynamic subsetting of dataframe by the contents of another

Body:
I have a dynamic dataframe of the top 5 'events' over the last year; produced by performing: head(source_df, 5). This produces a dataframe of the following structure:

top_5  <- structure(list(Date = structure(c(1670284800, 1669852800,
1669161600, 1668470400, 1668470400), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), Name = c("lt 20",
"lt 201", "lt 45", "lt 212",
"lt 01"),
    Volume = c(3252, 2511.221,
    3559.5, 3250, 2250), Amount = c(2.1, 2.4,
    1.21, 1.44, 6.12), AAP = c(3.472214,
    3.411409, 3.346509, 3.425947, 3.591546), Code= c("C7720", "Z8158",
    "K7110", "Z2138", "G7751")), row.names = c(NA,
5L), class = "data.frame")

I have a number of huge dataframes that cover various transactions in these codes.
What I would like to do is dynamically create 5 subsetted dataframes (df1, df2, df3, df4, df5) for each of the codes in the above dataframe. Does anyone have any advice on how to achieve this? Apologies for any issue, English is not a first language.

As request, here is a portion of dput:

df <- structure(list(Code = c("CK1204", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "CK1204", "CK1204", "C7720",
"C7720", "C7720", "CK1204", "C7720", "CK1204", "CK1204", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "CK1204", "C7720", "CK1204", "C7720",
"C7720", "C7720", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "C7720",
"CK1204", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "CK1204", "CK1204", "CK1204", "CK1204", "C7720",
"C7720", "CK1204", "CK1204", "CK1204", "CK1204", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"C7720", "C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "CK1204", "CK1204", "CK1204",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "C7720", "CK1204", "CK1204", "CK1204", "CK1204", "CK1204",
"C7720", "C7720", "C7720", "C7720", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "CK1204", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204", "CK1204",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "C7720", "CK1204", "CK1204", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "CK1204", "C7720", "CK1204", "C7720", "C7720", "CK1204",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "C7720",
"C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "CK1204", "CK1204",
"CK1204", "C7720", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "CK1204", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "CK1204", "CK1204", "CK1204", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "CK1204", "CK1204", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"CK1204", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "C7720", "CK1204", "C7720", "CK1204", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "C7720", "CK1204", "C7720", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204", "C7720",
"C7720", "C7720", "C7720", "CK1204", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "CK1204", "CK1204", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "CK1204", "CK1204", "CK1204",
"C7720", "CK1204", "C7720", "C7720", "CK1204", "C7720", "CK1204",
"C7720", "C7720", "C7720", "C7720", "CK1204", "C7720", "C7720",
"CK1204", "C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "C7720", "CK1204", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"CK1204", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "CK1204", "CK1204", "CK1204", "C7720", "CK1204", "CK1204",
"C7720", "C7720", "CK1204", "C7720", "C7720", "CK1204", "C7720",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "CK1204",
"C7720", "CK1204", "CK1204", "C7720", "C7720", "CK1204", "CK1204",
"CK1204", "C7720", "CK1204", "CK1204", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "CK1204",
"CK1204", "C7720", "C7720", "C7720", "CK1204", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "C7720", "CK1204", "CK1204",
"C7720", "C7720", "C7720", "CK1204", "C7720", "C7720", "C7720",
"C7720", "CK1204", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "CK1204", "C7720", "C7720", "CK1204",
"C7720", "C7720", "CK1204", "CK1204", "CK1204", "CK1204", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "C7720", "C7720",
"C7720", "C7720", "C7720", "C7720", "C7720", "CK1204", "CK1204",
"C7720", "C7720", "CK1204", "C7720", "C7720", "C7720", "CK1204",
"C7720", "CK1204", "C7720", "CK1204", "CK1204", "C7720", "C7720",
"C7720", "C7720", "CK1204", "C7720"), created_date = structure(c(1665648152,
1665648158, 1665659232, 1665659242, 1665659251, 1665659252, 1665659253,
1665669818, 1665669821, 1665669824, 1665675909, 1665678402, 1665730532,
1665730557, 1665730557, 1665730658, 1665732786, 1665732799, 1665733243,
1665735272, 1665735539, 1665736772, 1665738161, 1665738162, 1665738163,
1665738844, 1665740917, 1665741969, 1665752537, 1665761590, 1665993764,
1665994115, 1665995443, 1665996642, 1666000592, 1666000618, 1666023627,
1666077837, 1666077840, 1666077840, 1666078233, 1666078244, 1666079323,
1666079424, 1666079592, 1666081830, 1666082531, 1666083527, 1666083684,
1666085306, 1666085307, 1666085308, 1666085308, 1666096369, 1666165196,
1666165208, 1666166681, 1666166794, 1666167309, 1666167700, 1666169296,
1666169773, 1666169888, 1666170107, 1666171340, 1666179630, 1666187378,
1666187379, 1666187382, 1666251885, 1666254899, 1666254903, 1666255923,
1666255923, 1666256216, 1666258252, 1666258255, 1666258266, 1666260784,
1666260786, 1666266370, 1666282551, 1666282552, 1666282553, 1666282553,
1666337321, 1666337321, 1666338405, 1666338409, 1666338410, 1666338412,
1666338414, 1666339297, 1666340555, 1666340560, 1666340560, 1666340560,
1666341337, 1666341342, 1666341342, 1666341646, 1666343764, 1666343819,
1666343822, 1666348703, 1666348704, 1666348705, 1666348713, 1666597423,
1666597846, 1666598453, 1666599461, 1666599464, 1666600182, 1666600189,
1666600944, 1666601297, 1666602821, 1666604877, 1666605403, 1666606271,
1666606854, 1666607956, 1666607959, 1666622108, 1666627412, 1666683967,
1666684016, 1666684533, 1666686088, 1666686392, 1666687135, 1666687137,
1666687324, 1666690920, 1666693504, 1666694374, 1666698401, 1666717757,
1666769576, 1666769594, 1666769832, 1666770004, 1666770221, 1666770275,
1666770275, 1666770601, 1666770969, 1666775072, 1666775271, 1666855021,
1666856413, 1666860314, 1666860315, 1666860317, 1666860318, 1666860319,
1666860320, 1666861307, 1666861480, 1666861525, 1666861587, 1666866119,
1666866262, 1666866996, 1666870087, 1666870093, 1666890419, 1666942353,
1666942355, 1666943062, 1666943518, 1666943558, 1666943736, 1666943854,
1666945798, 1666946105, 1666948598, 1666950225, 1666962199, 1666962564,
1666972042, 1667200485, 1667200489, 1667201538, 1667201538, 1667201550,
1667201550, 1667202087, 1667202094, 1667202940, 1667204160, 1667206317,
1667206317, 1667206319, 1667206321, 1667206322, 1667206329, 1667206823,
1667207094, 1667207285, 1667210155, 1667211720, 1667214158, 1667214158,
1667214158, 1667214162, 1667214162, 1667214172, 1667214172, 1667219532,
1667227480, 1667231544, 1667231548, 1667286815, 1667288344, 1667288344,
1667288526, 1667288763, 1667289691, 1667290883, 1667290899, 1667290899,
1667291193, 1667291552, 1667292537, 1667293882, 1667293882, 1667297509,
1667297509, 1667297512, 1667297526, 1667297526, 1667297528, 1667297562,
1667310644, 1667318983, 1667319255, 1667321535, 1667376540, 1667377020,
1667377023, 1667377320, 1667377320, 1667377431, 1667377436, 1667377436,
1667377441, 1667377441, 1667377508, 1667377508, 1667377530, 1667377530,
1667377632, 1667377637, 1667377640, 1667378756, 1667379292, 1667381932,
1667382098, 1667383621, 1667384112, 1667386434, 1667396849, 1667397993,
1667398183, 1667406911, 1667460369, 1667460743, 1667462319, 1667462319,
1667462319, 1667462770, 1667464205, 1667464237, 1667464737, 1667464741,
1667464741, 1667464741, 1667464741, 1667464741, 1667464741, 1667468132,
1667468140, 1667468140, 1667468622, 1667468654, 1667469023, 1667470267,
1667473338, 1667484332, 1667484332, 1667486381, 1667487021, 1667487099,
1667487099, 1667487115, 1667487115, 1667487226, 1667488216, 1667488229,
1667492365, 1667492369, 1667494230, 1667544688, 1667545642, 1667545642,
1667546201, 1667546224, 1667546227, 1667546229, 1667548038, 1667548954,
1667548958, 1667548958, 1667549546, 1667549546, 1667550057, 1667550057,
1667551249, 1667551249, 1667551249, 1667551249, 1667553391, 1667553391,
1667553391, 1667554964, 1667554964, 1667555308, 1667562224, 1667562224,
1667562224, 1667565578, 1667565580, 1667565580, 1667565580, 1667565581,
1667565581, 1667566223, 1667566224, 1667566225, 1667566226, 1667566229,
1667568922, 1667571775, 1667573810, 1667576872, 1667578294, 1667580587,
1667803625, 1667804580, 1667804694, 1667805044, 1667806431, 1667806844,
1667806845, 1667806845, 1667806845, 1667806845, 1667806849, 1667806855,
1667806855, 1667806855, 1667806855, 1667807039, 1667807281, 1667807286,
1667807286, 1667808698, 1667808710, 1667809402, 1667810034, 1667810209,
1667810212, 1667810498, 1667810502, 1667810502, 1667811984, 1667811984,
1667811986, 1667811988, 1667811989, 1667812052, 1667813410, 1667818484,
1667818484, 1667818484, 1667818672, 1667818672, 1667823977, 1667823982,
1667825766, 1667825766, 1667825766, 1667834700, 1667834706, 1667891311,
1667891413, 1667891415, 1667891417, 1667891425, 1667891603, 1667892181,
1667892191, 1667892381, 1667893317, 1667893317, 1667893320, 1667893528,
1667894914, 1667895763, 1667895770, 1667895770, 1667896557, 1667900431,
1667902493, 1667902765, 1667902812, 1667902824, 1667902829, 1667902837,
1667903416, 1667904504, 1667904505, 1667904506, 1667907454, 1667909259,
1667909433, 1667916549, 1667916549, 1667919949, 1667919949, 1667919949,
1667921719, 1667924253, 1667924254, 1667924958, 1667925056, 1667926265,
1667978320, 1667980092, 1667980092, 1667980402, 1667980402, 1667980547,
1667980551, 1667981245, 1667981245, 1667981245, 1667981245, 1667981254,
1667981258, 1667981258, 1667981275, 1667982875, 1667982882, 1667983066,
1667984077, 1667984078, 1667984079, 1667984080, 1667984080, 1667984641,
1667984645, 1667984645, 1667984645, 1667984825, 1667986231, 1667986236,
1667987283, 1667996194, 1667998660, 1667998668, 1667999706, 1667999706,
1667999710, 1667999710, 1668003316, 1668003607, 1668004628, 1668008021,
1668008021, 1668008528, 1668008528, 1668008528, 1668008528, 1668008769,
1668009889, 1668010101, 1668011365, 1668012950, 1668064515, 1668065545,
1668066587, 1668067471, 1668067471, 1668067471, 1668067483, 1668067493,
1668068723, 1668069072, 1668069967, 1668069968, 1668069977, 1668069978,
1668069981, 1668069983, 1668070023, 1668071160, 1668072141, 1668072141,
1668073494, 1668075105, 1668075706, 1668075707, 1668075708, 1668075710,
1668075713, 1668077628, 1668085739, 1668085741, 1668096393, 1668096393,
1668149395, 1668153260, 1668154237, 1668156235, 1668156235, 1668157012,
1668157147, 1668157332, 1668167339, 1668167339, 1668170529, 1668413110,
1668414754, 1668415865, 1668416072, 1668416902, 1668417181, 1668417185,
1668420061, 1668420063, 1668420505, 1668423159, 1668424535, 1668424536,
1668424539, 1668442856, 1668442857, 1668442857, 1668442858, 1668442859,
1668442861, 1668443364, 1668443928, 1668497726, 1668505114, 1668505114,
1668505500, 1668506072, 1668506072, 1668507689, 1668517854, 1668517855,
1668519266, 1668522565, 1668522647, 1668529177, 1668581733, 1668582998,
1668584740, 1668584796, 1668584804, 1668584982, 1668585802, 1668589701,
1668589701, 1668589873, 1668589879, 1668591811, 1668592099, 1668592099,
1668596905, 1668596909, 1668596913, 1668596913, 1668605401, 1668605401,
1668607548, 1668607560, 1668607567, 1668607592, 1668668093, 1668672420,
1668673103, 1668673440, 1668673916, 1668673916, 1668673916, 1668673916,
1668673927, 1668673927, 1668679742, 1668679844, 1668679996, 1668686025,
1668686025, 1668686029, 1668686030, 1668686033, 1668686035, 1668701135,
1668701146, 1668701150, 1668755601, 1668760627, 1668760627, 1668760627,
1668761290, 1668762519, 1668770870, 1668770885, 1668770925, 1668770941,
1668773335, 1668773345, 1668780842, 1669015665, 1669016645, 1669016645,
1669019633, 1669019633, 1669019633, 1669019635, 1669019636, 1669019637,
1669019637, 1669019641, 1669019644, 1669020014, 1669020014, 1669023279,
1669023306, 1669023340, 1669045748, 1669046718, 1669046719, 1669046721,
1669046740, 1669046869, 1669104172, 1669105613, 1669105613, 1669105613,
1669105615, 1669105615, 1669105616, 1669105616, 1669106551, 1669106561,
1669106561, 1669106562, 1669106562, 1669106571, 1669106571, 1669127456,
1669127509, 1669131960, 1669131960, 1669132073, 1669132112, 1669137144,
1669187743, 1669187743, 1669189055, 1669192137, 1669192137, 1669192137,
1669199126, 1669199288, 1669212237, 1669212241, 1669212241, 1669217964,
1669217965, 1669217966, 1669217967, 1669217971, 1669217980, 1669275749,
1669275930, 1669275930, 1669275930, 1669277152, 1669277152, 1669277152,
1669277153, 1669277240, 1669283770, 1669288792, 1669361473, 1669361957,
1669362044, 1669362078, 1669362078, 1669362078, 1669362164, 1669362183,
1669363788, 1669363788, 1669363788, 1669363788, 1669363788, 1669363788,
1669363788, 1669363788, 1669363796, 1669363796, 1669363796, 1669369720,
1669374472, 1669374769, 1669384355, 1669384356, 1669384357, 1669384358,
1669384359, 1669394535, 1669621688, 1669621688, 1669621919, 1669621919,
1669621984, 1669623710, 1669623790, 1669624502, 1669631566, 1669631568,
1669636034, 1669636319, 1669648542, 1669649429, 1669705560, 1669708245,
1669708253, 1669709201, 1669709201, 1669709201, 1669710009, 1669710013,
1669728157, 1669728157, 1669728158, 1669728158, 1669729113, 1669731123,
1669735618, 1669735622, 1669735655, 1669792519, 1669792519, 1669792687,
1669793685, 1669793685, 1669793689, 1669795433, 1669795555, 1669795568,
1669797843, 1669797890, 1669800804, 1669802361, 1669803951, 1669803951,
1669812329, 1669823547, 1669878606, 1669879411, 1669879504, 1669879525,
1669880945, 1669881538, 1669881538, 1669881785, 1669881791, 1669881967,
1669881967, 1669881997, 1669882798, 1669886097, 1669893425, 1669893425,
1669893425, 1669893432, 1669893432, 1669893432, 1669894181, 1669895088,
1669898383, 1669900645, 1669900645, 1669901390, 1669901978, 1669905313,
1669908785, 1669911665, 1669912944, 1669914474, 1669914474, 1669965802,
1669967824, 1669967824, 1669967824, 1669968681, 1669972570, 1669972571,
1669972572, 1669972695, 1669973475, 1669973629, 1669973633, 1669973907,
1669973912, 1669985457, 1669985459, 1669985459, 1669985459, 1669985459,
1669985459, 1669988227, 1669988227, 1669990749, 1669992593, 1669992601,
1670000320, 1670000320, 1670000321, 1670000321, 1670000324, 1670000472,
1670000472, 1670001039, 1670223647, 1670223647, 1670226128, 1670226720,
1670227647, 1670227647, 1670228798, 1670228798, 1670228941, 1670228941,
1670228943, 1670228943, 1670228945, 1670228945, 1670228946, 1670228946,
1670230164, 1670231490, 1670237010, 1670237010, 1670250864, 1670253784,
1670254814, 1670258111, 1670258111, 1670258117, 1670259376, 1670259376,
1670260039, 1670260040, 1670310866, 1670310870, 1670311438, 1670311653,
1670314066, 1670314097, 1670317614, 1670318798, 1670324910, 1670328627
), class = c("POSIXct", "POSIXt"), tzone = "UTC"), quantity = c(0.1,
0.045, 0.025, 0.025, 0.025, 0.025, 0.02, 0.045, 0.045, 0.043,
0.001, 0.024, 0.012, 0.056, 0.012, 0.07, 0.111, 0.119, 0.012,
0.015, 0.012, 0.005, 0.012, 0.012, 0.012, 0.012, 0.007, 0.054,
0.054, 0.012, 0.101, 0.003, 0.031, 0.025, 0.04, 0.085, 0.04,
0.009, 0.028, 0.003, 0.025, 0.015, 0.025, 0.001, 0.09, 0.06,
0.006, 0.023, 0.017, 0.01, 0.01, 0.01, 0.01, 0.034, 0.095, 0.023,
0.024, 0.025, 0.04, 0.003, 0.05, 0.048, 0.025, 0.048, 0.001,
0.001, 0.025, 0.025, 0.008, 0.1, 0.018, 0.016, 0.016, 0.009,
0.001, 0.008, 0.046, 0.02, 0.015, 0.033, 0.049, 0.018, 0.018,
0.018, 0.018, 0.036, 0.028, 0.009, 0.017, 0.017, 0.017, 0.017,
0.001, 0.2, 0.002, 0.055, 0.01, 0.149, 0.002, 0.001, 0.016, 0.001,
0.021, 0.027, 0.021, 0.021, 0.021, 0.001, 0.001, 0.001, 0.001,
0.002, 0.001, 0.033, 0.164, 0.054, 0.005, 0.043, 0.002, 0.005,
0.039, 0.011, 0.2, 0.072, 0.003, 0.036, 0.001, 0.001, 0.03, 0.2,
0.001, 0.021, 0.018, 0.001, 0.038, 0.048, 0.002, 0.041, 0.3,
0.001, 0.002, 0.001, 0.036, 0.006, 0.053, 0.001, 0.2, 0.058,
0.048, 0.05, 0.001, 0.002, 0.05, 0.05, 0.05, 0.05, 0.05, 0.02,
0.009, 0.02, 0.011, 0.039, 0.014, 0.009, 0.055, 0.01, 0.121,
0.071, 0.015, 0.015, 0.002, 0.007, 0.034, 0.001, 0.036, 0.001,
0.017, 0.047, 0.132, 0.005, 0.009, 0.086, 0.052, 0.002, 0.001,
0.023, 0.002, 0.022, 0.021, 0.021, 0.001, 0.022, 0.002, 0.013,
0.015, 0.015, 0.015, 0.015, 0.015, 0.015, 0.009, 0.001, 0.01,
0.057, 0.094, 0.049, 0.189, 0.011, 0.084, 0.04, 0.035, 0.011,
0.039, 0.011, 0.007, 0.062, 0.002, 0.001, 0.001, 0.015, 0.002,
0.046, 0.048, 0.015, 0.009, 0.012, 0.006, 0.044, 0.172, 0.018,
0.09, 0.162, 0.163, 0.09, 0.094, 0.015, 0.011, 0.027, 0.04, 0.104,
0.002, 0.009, 0.03, 0.01, 0.02, 0.03, 0.01, 0.039, 0.018, 0.035,
0.015, 0.009, 0.03, 0.007, 0.048, 0.07, 0.05, 0.083, 0.018, 0.012,
0.009, 0.046, 0.038, 0.112, 0.05, 0.008, 0.002, 0.001, 0.043,
0.015, 0.025, 0.016, 0.038, 0.034, 0.008, 0.002, 0.006, 0.002,
0.023, 0.011, 0.045, 0.003, 0.015, 0.005, 0.001, 0.027, 0.001,
0.005, 0.008, 0.038, 0.076, 0.012, 0.001, 0.017, 0.009, 0.034,
0.004, 0.002, 0.021, 0.021, 0.016, 0.003, 0.005, 0.003, 0.008,
0.1, 0.046, 0.04, 0.01, 0.005, 0.004, 0.1, 0.02, 0.01, 0.03,
0.02, 0.049, 0.049, 0.103, 0.013, 0.015, 0.048, 0.024, 0.02,
0.037, 0.009, 0.043, 0.02, 0.037, 0.003, 0.012, 0.002, 0.048,
0.003, 0.006, 0.011, 0.001, 0.001, 0.012, 0.012, 0.012, 0.012,
0.004, 0.002, 0.035, 0.045, 0.045, 0.026, 0.045, 0.013, 0.033,
0.005, 0.004, 0.012, 0.046, 0.006, 0.02, 0.151, 0.056, 0.02,
0.134, 0.019, 0.018, 0.038, 0.001, 0.02, 0.015, 0.035, 0.05,
0.05, 0.03, 0.003, 0.02, 0.004, 0.02, 0.041, 0.008, 0.02, 0.001,
0.021, 0.021, 0.017, 0.003, 0.012, 0.001, 0.001, 0.025, 0.007,
0.028, 0.025, 0.023, 0.012, 0.024, 0.001, 0.024, 0.025, 0.044,
0.01, 0.005, 0.004, 0.019, 0.025, 0.1, 0.109, 0.054, 0.031, 0.095,
0.036, 0.001, 0.065, 0.097, 0.094, 0.006, 0.003, 0.012, 0.002,
0.124, 0.004, 0.015, 0.015, 0.004, 0.054, 0.036, 0.036, 0.017,
0.029, 0.024, 0.014, 0.006, 0.034, 0.068, 0.317, 0.042, 0.017,
0.014, 0.013, 0.033, 0.001, 0.025, 0.013, 0.024, 0.016, 0.011,
0.089, 0.039, 0.015, 0.068, 0.06, 0.015, 0.026, 0.021, 0.026,
0.015, 0.018, 0.015, 0.005, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02,
0.01, 0.003, 0.01, 0.024, 0.025, 0.1, 0.05, 0.035, 0.031, 0.015,
0.005, 0.015, 0.003, 0.003, 0.034, 0.021, 0.005, 0.04, 0.001,
0.035, 0.043, 0.005, 0.037, 0.089, 0.059, 0.068, 0.001, 0.002,
0.05, 0.013, 0.02, 0.001, 0.015, 0.016, 0.031, 0.038, 0.07, 0.011,
0.041, 0.01, 0.002, 0.024, 0.024, 0.016, 0.008, 0.01, 0.026,
0.004, 0.125, 0.007, 0.008, 0.018, 0.018, 0.018, 0.018, 0.015,
0.001, 0.037, 0.035, 0.016, 0.117, 0.013, 0.07, 0.066, 0.046,
0.083, 0.009, 0.025, 0.025, 0.018, 0.032, 0.034, 0.002, 0.001,
0.035, 0.025, 0.075, 0.006, 0.012, 0.112, 0.012, 0.025, 0.008,
0.015, 0.015, 0.005, 0.023, 0.023, 0.023, 0.023, 0.001, 0.013,
0.005, 0.008, 0.013, 0.003, 0.112, 0.029, 0.036, 0.017, 0.026,
0.035, 0.035, 0.05, 0.061, 0.074, 0.004, 0.001, 0.012, 0.027,
0.05, 0.01, 0.015, 0.001, 0.1, 0.079, 0.045, 0.013, 0.02, 0.001,
0.027, 0.02, 0.019, 0.025, 0.083, 0.011, 0.039, 0.022, 0.045,
0.012, 0.033, 0.013, 0.001, 0.001, 0.008, 0.01, 0.001, 0.159,
0.01, 0.042, 0.018, 0.047, 0.031, 0.005, 0.015, 0.015, 0.095,
0.024, 0.006, 0.001, 0.03, 0.01, 0.01, 0.013, 0.035, 0.153, 0.099,
0.03, 0.043, 0.072, 0.018, 0.005, 0.001, 0.02, 0.02, 0.039, 0.01,
0.01, 0.01, 0.028, 0.015, 0.013, 0.028, 0.028, 0.022, 0.028,
0.006, 0.001, 0.159, 0.235, 0.03, 0.06, 0.01, 0.046, 0.014, 0.003,
0.001, 0.013, 0.027, 0.013, 0.035, 0.01, 0.072, 0.015, 0.015,
0.002, 0.007, 0.109, 0.051, 0.01, 0.001, 0.002, 0.01, 0.21, 0.09,
0.007, 0.035, 0.015, 0.015, 0.015, 0.013, 0.013, 0.013, 0.032,
0.331, 0.159, 0.01, 0.051, 0.01, 0.002, 0.027, 0.001, 0.021,
0.021, 0.021, 0.021, 0.018, 0.019, 0.011, 0.051, 0.205, 0.044,
0.013, 0.035, 0.002, 0.006, 0.06, 0.021, 0.002, 0.1, 0.051, 0.042,
0.013, 0.041, 0.013, 0.009, 0.061, 0.007, 0.052, 0.002, 0.001,
0.026, 0.003, 0.104, 0.013, 0.011, 0.142, 0.039, 0.1, 0.091,
0.01, 0.012, 0.006, 0.003, 0.001, 0.001, 0.049, 0.015, 0.42,
0.013, 0.013, 0.04, 0.091, 0.011, 0.03, 0.006, 0.035, 0.035,
0.035, 0.036, 0.027, 0.013, 0.032, 0.032, 0.128, 0.261, 0.011,
0.035, 0.02, 0.018, 0.015, 0.015, 0.018, 0.03, 0.016, 0.035,
0.035, 0.016, 0.004, 0.06, 0.09, 0.339, 0.011, 0.1, 0.141, 0.013,
0.035, 0.1, 0.025, 0.018, 0.08, 0.009, 0.002, 0.011, 0.041, 0.013,
0.007, 0.03, 0.08, 0.017, 0.215, 0.285, 0.02, 0.006, 0.05, 0.05,
0.1, 0.012, 0.09, 0.043, 0.015, 0.015, 0.014, 0.015, 0.005, 0.035,
0.03, 0.007, 0.015, 0.041, 0.065, 0.036, 0.008, 0.017, 0.044,
0.002, 0.001, 0.034, 0.013, 0.007, 0.057, 0.011, 0.099, 0.081,
0.02, 0.005, 0.04, 0.05, 0.001, 0.001, 0.02, 0.005, 0.07, 0.018,
0.002, 0.002, 0.009, 0.004, 0.015, 0.01, 0.003, 0.012, 0.023,
0.015, 0.017, 0.017, 0.015, 0.005, 0.058, 0.027, 0.031, 0.072,
0.014, 0.021, 0.109, 0.055, 0.099, 0.054, 0.039, 0.015, 0.035,
0.015, 0.035, 0.015, 0.035, 0.015, 0.035, 0.013, 0.013, 0.015,
0.036, 0.05, 0.062, 0.006, 0.015, 0.06, 0.009, 0.037, 0.034,
0.042, 0.012, 0.099, 0.013, 0.157, 0.063, 0.012, 0.012, 0.008,
0.007, 0.062, 0.021)), class = c("data.table", "data.frame"), row.names = c(NA,
-883L))


来源: stackexchange

问:
How can you perform UI Testing without Using Mocks?
I have SwiftUI application and I need to test my user interface. The interface contains login view, where the button sends a request to the authentication service and get result back. Since, I am not using Mocks how can I test my interface. For the UI Test, I can switch to the test server but then I am very close to writing an end to end test.

Would it make sense to skip UI Tests and simply perform End to End testing with a real test server?

ContentLicense: CC BY-SA 4.0


问:
How do I make a series of variables in python?
I am trying to make several subsets from one Dataframe and then do the repetitive task of manipulating each subset.
for example
From existing Dataframe, df

```<code>for i in range(1, 101):
  globals()['df'+str(i)] = df.iloc[i:10*i, i:20*i]

df1 = df.stack()
df1 = pd.DataFrame(df1, columns=['1'])

df2 = df.stack()
df2 = pd.DataFrame(df2, columns=['2'])

df3 = df.stack()
df3 = pd.DataFrame(df3, columns=['3'])
.
.
.
.
df100 = df.stack()
df100 = pd.DataFrame(df3, columns=['100'])

</code>```

After df.iloc manipulation, should I write down 100 times same code?
Is there any good way to use simple code to create 100ea sub dataframe?

Body:
I am trying to make several subsets from one Dataframe and then do the repetitive task of manipulating each subset.
for example
From existing Dataframe, df

for i in range(1, 101):
  globals()['df'+str(i)] = df.iloc[i:10*i, i:20*i]

df1 = df.stack()
df1 = pd.DataFrame(df1, columns=['1'])

df2 = df.stack()
df2 = pd.DataFrame(df2, columns=['2'])

df3 = df.stack()
df3 = pd.DataFrame(df3, columns=['3'])
.
.
.
.
df100 = df.stack()
df100 = pd.DataFrame(df3, columns=['100'])

After df.iloc manipulation, should I write down 100 times same code?
Is there any good way to use simple code to create 100ea sub dataframe?


问:
Why is the MySQL connection getting closed when running from Azure Web Service with Spring boot & JPA
I have a web service on Azure, with a spring boot application. This application uses JPA to communicate with a MySQL server.

Running this application on localhost has not given me any issues, but as soon as I published the code to the web service, problems started to arise.

My main problem right now is that whenever I am not using the application for around 5 minutes, the connection to MySQL is getting dropped and it throws an error whenever I try to access it again: com.mysql.cj.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.

And it never opens another connection, which means I have to restart my app.

I have been looking online for a while now for a solution and have only found that I should try putting ?autoReconnect=true in my connection string, which unfortunately did not fix this issue.

Hope anyone can help.


问:
unable to instanciate java methode with karate
Method fails :

js failed: >>>> 01: WireMockHelper.get().reset() <<<< org.graalvm.polyglot.PolyglotException - logs.dependencies.utils.WireMockHelper.<init>(WireMockHelper.java:34) - logs.dependencies.utils.WireMockHelper.get(WireMockHelper.java:49) - <js>.:program(Unnamed:1)

i tried this :

```<code>    * def WireMockHelper = Java.type('logs.dependencies.utils.WireMockHelper')
    * def WireMockHelper_reset = WireMockHelper.get().reset()
</code>```

Body:
Method fails :

js failed: >>>> 01: WireMockHelper.get().reset() <<<< org.graalvm.polyglot.PolyglotException - logs.dependencies.utils.WireMockHelper.<init>(WireMockHelper.java:34) - logs.dependencies.utils.WireMockHelper.get(WireMockHelper.java:49) - <js>.:program(Unnamed:1)

i tried this :

    * def WireMockHelper = Java.type('logs.dependencies.utils.WireMockHelper')
    * def WireMockHelper_reset = WireMockHelper.get().reset()


问:
assert unhandled exception in Spring GraphQL
My stack is Spring Boot 3.0.0, Java 17, Spring GraphQL.

The GraphQL input model.

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor()
public class CreatePostInput {

    @NotBlank
    @Size(min = 5, max = 100)
    private String title;

    @NotBlank
    private String content;
}
```
<p>And the test is like this.</p>
<pre class="lang-java prettyprint-override"><code>@Test
// @Disabled
// see: https://github.com/spring-projects/spring-graphql/issues/110
void testCreatePost_FailedValidation() {
        var data = Post.builder().id(UUID.randomUUID().toString())
                .title("test title")
                .content("test content")
                .build();
        when(postService.createPost(any(CreatePostInput.class))).thenReturn(data);
        var creatPost = """
                mutation createPost($createPostInput: CreatePostInput!){
                   createPost(createPostInput:$createPostInput){
                   id
                   title
                   content
                   }
                }""".trim();

        String TITLE = "test";//not valid
        assertThatThrownBy(() -> graphQlTester.document(creatPost)
                .variable("createPostInput",
                        Map.of(
                                "title", TITLE,
                                "content", "content of my post"
                        )
                )
                .execute()
        ).hasCauseInstanceOf(ConstraintViolationException.class);

        verify(postService, times(0)).createPost(any(CreatePostInput.class));
        verifyNoMoreInteractions(postService);
}
</code>```

The test throws exceptions like this.

2022-12-06T22:40:56.663+08:00 ERROR 1284 --- [    Test worker] s.g.e.ExceptionResolversExceptionHandler : Unresolved ConstraintViolationException for executionId 52a54926-ed2f-a83a-f71b-0539697c28e7

jakarta.validation.ConstraintViolationException: createPost.input.title: size must be between 5 and 100
    at org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper.validate(HandlerMethodValidationHelper.java:81) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.DataFetcherHandlerMethod.validateAndInvoke(DataFetcherHandlerMethod.java:192) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.DataFetcherHandlerMethod.invoke(DataFetcherHandlerMethod.java:125) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer$SchemaMappingDataFetcher.get(AnnotatedControllerConfigurer.java:529) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.execution.ContextDataFetcherDecorator.lambda$get$0(ContextDataFetcherDecorator.java:74) ~[spring-graphql-1.1.0.jar:1.1.0]
    at io.micrometer.context.ContextSnapshot.lambda$wrap$1(ContextSnapshot.java:92) ~[context-propagation-1.0.0.jar:1.0.0]
    at org.springframework.graphql.execution.ContextDataFetcherDecorator.get(ContextDataFetcherDecorator.java:74) ~[spring-graphql-1.1.0.jar:1.1.0]
    at graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation.lambda$instrumentDataFetcher$0(DataLoaderDispatcherInstrumentation.java:86) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:282) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:211) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.resolveField(ExecutionStrategy.java:183) ~[graphql-java-19.2.jar:na]
    at graphql.execution.AsyncSerialExecutionStrategy.lambda$execute$1(AsyncSerialExecutionStrategy.java:47) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Async.eachSequentiallyImpl(Async.java:191) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Async.eachSequentially(Async.java:180) ~[graphql-java-19.2.jar:na]
    at graphql.execution.AsyncSerialExecutionStrategy.execute(AsyncSerialExecutionStrategy.java:42) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Execution.executeOperation(Execution.java:159) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Execution.execute(Execution.java:105) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.execute(GraphQL.java:645) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.lambda$parseValidateAndExecute$11(GraphQL.java:564) ~[graphql-java-19.2.jar:na]
    at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) ~[na:na]
    at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309) ~[na:na]
    at graphql.GraphQL.parseValidateAndExecute(GraphQL.java:559) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.executeAsync(GraphQL.java:527) ~[graphql-java-19.2.jar:na]
    at org.springframework.graphql.execution.DefaultExecutionGraphQlService.lambda$execute$2(DefaultExecutionGraphQlService.java:82) ~[spring-graphql-1.1.0.jar:1.1.0]
    at reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:47) ~[reactor-core-3.5.0.jar:3.5.0]
    at reactor.core.publisher.Mono.subscribe(Mono.java:4444) ~[reactor-core-3.5.0.jar:3.5.0]
    at reactor.core.publisher.Mono.block(Mono.java:1733) ~[reactor-core-3.5.0.jar:3.5.0]
    at org.springframework.graphql.test.tester.DefaultGraphQlTester$DefaultRequest.execute(DefaultGraphQlTester.java:156) ~[spring-graphql-test-1.1.0.jar:1.1.0]
    at com.example.demo.MutationTests.lambda$testCreatePost_FailedValidation$0(MutationTests.java:93) ~[test/:na]
    at org.assertj.core.api.ThrowableAssert.catchThrowable(ThrowableAssert.java:63) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.AssertionsForClassTypes.catchThrowable(AssertionsForClassTypes.java:892) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.Assertions.catchThrowable(Assertions.java:1366) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.Assertions.assertThatThrownBy(Assertions.java:1210) ~[assertj-core-3.23.1.jar:na]
    at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86) ~[test/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) ~[junit-platform-commons-1.9.1.jar:1.9.1]
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[na:na]
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) ~[na:na]
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
    at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) ~[na:na]
    at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) ~[na:na]
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133) ~[na:na]
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71) ~[na:na]
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) ~[gradle-worker.jar:na]
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) ~[gradle-worker.jar:na]

...

Expecting code to raise a throwable.
java.lang.AssertionError:
Expecting code to raise a throwable.
    at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86)

...

MutationTests > testCreatePost_FailedValidation() FAILED
    java.lang.AssertionError:
    Expecting code to raise a throwable.
        at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86)

```

I do not create an exception handler to resolve this exception, how to assert the exception in the tests.

Body:
My stack is Spring Boot 3.0.0, Java 17, Spring GraphQL.

The GraphQL input model.

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor()
public class CreatePostInput {

    @NotBlank
    @Size(min = 5, max = 100)
    private String title;

    @NotBlank
    private String content;
}

And the test is like this.

@Test
// @Disabled
// see: https://github.com/spring-projects/spring-graphql/issues/110
void testCreatePost_FailedValidation() {
        var data = Post.builder().id(UUID.randomUUID().toString())
                .title("test title")
                .content("test content")
                .build();
        when(postService.createPost(any(CreatePostInput.class))).thenReturn(data);
        var creatPost = """
                mutation createPost($createPostInput: CreatePostInput!){
                   createPost(createPostInput:$createPostInput){
                   id
                   title
                   content
                   }
                }""".trim();

        String TITLE = "test";//not valid
        assertThatThrownBy(() -> graphQlTester.document(creatPost)
                .variable("createPostInput",
                        Map.of(
                                "title", TITLE,
                                "content", "content of my post"
                        )
                )
                .execute()
        ).hasCauseInstanceOf(ConstraintViolationException.class);

        verify(postService, times(0)).createPost(any(CreatePostInput.class));
        verifyNoMoreInteractions(postService);
}

The test throws exceptions like this.

2022-12-06T22:40:56.663+08:00 ERROR 1284 --- [    Test worker] s.g.e.ExceptionResolversExceptionHandler : Unresolved ConstraintViolationException for executionId 52a54926-ed2f-a83a-f71b-0539697c28e7

jakarta.validation.ConstraintViolationException: createPost.input.title: size must be between 5 and 100
    at org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper.validate(HandlerMethodValidationHelper.java:81) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.DataFetcherHandlerMethod.validateAndInvoke(DataFetcherHandlerMethod.java:192) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.DataFetcherHandlerMethod.invoke(DataFetcherHandlerMethod.java:125) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer$SchemaMappingDataFetcher.get(AnnotatedControllerConfigurer.java:529) ~[spring-graphql-1.1.0.jar:1.1.0]
    at org.springframework.graphql.execution.ContextDataFetcherDecorator.lambda$get$0(ContextDataFetcherDecorator.java:74) ~[spring-graphql-1.1.0.jar:1.1.0]
    at io.micrometer.context.ContextSnapshot.lambda$wrap$1(ContextSnapshot.java:92) ~[context-propagation-1.0.0.jar:1.0.0]
    at org.springframework.graphql.execution.ContextDataFetcherDecorator.get(ContextDataFetcherDecorator.java:74) ~[spring-graphql-1.1.0.jar:1.1.0]
    at graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation.lambda$instrumentDataFetcher$0(DataLoaderDispatcherInstrumentation.java:86) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:282) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:211) ~[graphql-java-19.2.jar:na]
    at graphql.execution.ExecutionStrategy.resolveField(ExecutionStrategy.java:183) ~[graphql-java-19.2.jar:na]
    at graphql.execution.AsyncSerialExecutionStrategy.lambda$execute$1(AsyncSerialExecutionStrategy.java:47) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Async.eachSequentiallyImpl(Async.java:191) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Async.eachSequentially(Async.java:180) ~[graphql-java-19.2.jar:na]
    at graphql.execution.AsyncSerialExecutionStrategy.execute(AsyncSerialExecutionStrategy.java:42) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Execution.executeOperation(Execution.java:159) ~[graphql-java-19.2.jar:na]
    at graphql.execution.Execution.execute(Execution.java:105) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.execute(GraphQL.java:645) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.lambda$parseValidateAndExecute$11(GraphQL.java:564) ~[graphql-java-19.2.jar:na]
    at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) ~[na:na]
    at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309) ~[na:na]
    at graphql.GraphQL.parseValidateAndExecute(GraphQL.java:559) ~[graphql-java-19.2.jar:na]
    at graphql.GraphQL.executeAsync(GraphQL.java:527) ~[graphql-java-19.2.jar:na]
    at org.springframework.graphql.execution.DefaultExecutionGraphQlService.lambda$execute$2(DefaultExecutionGraphQlService.java:82) ~[spring-graphql-1.1.0.jar:1.1.0]
    at reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:47) ~[reactor-core-3.5.0.jar:3.5.0]
    at reactor.core.publisher.Mono.subscribe(Mono.java:4444) ~[reactor-core-3.5.0.jar:3.5.0]
    at reactor.core.publisher.Mono.block(Mono.java:1733) ~[reactor-core-3.5.0.jar:3.5.0]
    at org.springframework.graphql.test.tester.DefaultGraphQlTester$DefaultRequest.execute(DefaultGraphQlTester.java:156) ~[spring-graphql-test-1.1.0.jar:1.1.0]
    at com.example.demo.MutationTests.lambda$testCreatePost_FailedValidation$0(MutationTests.java:93) ~[test/:na]
    at org.assertj.core.api.ThrowableAssert.catchThrowable(ThrowableAssert.java:63) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.AssertionsForClassTypes.catchThrowable(AssertionsForClassTypes.java:892) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.Assertions.catchThrowable(Assertions.java:1366) ~[assertj-core-3.23.1.jar:na]
    at org.assertj.core.api.Assertions.assertThatThrownBy(Assertions.java:1210) ~[assertj-core-3.23.1.jar:na]
    at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86) ~[test/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) ~[junit-platform-commons-1.9.1.jar:1.9.1]
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68) ~[junit-jupiter-engine-5.9.1.jar:5.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.9.1.jar:1.9.1]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[na:na]
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[na:na]
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[na:na]
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) ~[na:na]
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) ~[na:na]
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
    at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) ~[na:na]
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) ~[na:na]
    at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) ~[na:na]
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133) ~[na:na]
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71) ~[na:na]
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) ~[gradle-worker.jar:na]
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) ~[gradle-worker.jar:na]

...

Expecting code to raise a throwable.
java.lang.AssertionError:
Expecting code to raise a throwable.
    at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86)

...

MutationTests > testCreatePost_FailedValidation() FAILED
    java.lang.AssertionError:
    Expecting code to raise a throwable.
        at com.example.demo.MutationTests.testCreatePost_FailedValidation(MutationTests.java:86)

I do not create an exception handler to resolve this exception, how to assert the exception in the tests.


问:
Is is possible to have a IAM identity provider OIDC where the provider url is only accessible from my VPC?
I'm getting the following error when using sts:AssumeRoleWithWebIdentity

```<code>An error occurred (InvalidIdentityToken) when calling the AssumeRoleWithWebIdentity operation: Couldn't retrieve verification key from your identity provider,  please reference AssumeRoleWithWebIdentity documentation for requirements
</code>```

I found the AWS support Article : How can I resolve the AWS STS AssumeRoleWithWebIdentity API call error "InvalidIdentityToken"? where it does state

This error can occur if:

The .well_known URL and jwks_uri of the identity provider (IdP) are inaccessible from the public internet.

which is indeed my case since I'm using a private GitLab instance (not reachable from the public internet). The idea is to use the GitLab $CI_JOB_JWT_V2 to sts:AssumeRoleWithWebIdentity to avoid having long term credentials as GitLab CI/CD variables (see Configure OpenID Connect in AWS to retrieve temporary credentials). But it doesn't work because I can't add the GitLab instance as IAM identity provider since it's not public.

Is there any way to tell STS to contact the https://xxxxx/.well-known/openid-configuration via my VPC instead?

Body:
I'm getting the following error when using sts:AssumeRoleWithWebIdentity

An error occurred (InvalidIdentityToken) when calling the AssumeRoleWithWebIdentity operation: Couldn't retrieve verification key from your identity provider,  please reference AssumeRoleWithWebIdentity documentation for requirements

I found the AWS support Article : How can I resolve the AWS STS AssumeRoleWithWebIdentity API call error "InvalidIdentityToken"? where it does state

This error can occur if:

The .well_known URL and jwks_uri of the identity provider (IdP) are inaccessible from the public internet.

which is indeed my case since I'm using a private GitLab instance (not reachable from the public internet). The idea is to use the GitLab $CI_JOB_JWT_V2 to sts:AssumeRoleWithWebIdentity to avoid having long term credentials as GitLab CI/CD variables (see Configure OpenID Connect in AWS to retrieve temporary credentials). But it doesn't work because I can't add the GitLab instance as IAM identity provider since it's not public.

Is there any way to tell STS to contact the https://xxxxx/.well-known/openid-configuration via my VPC instead?


问:
Atom error: Request for package information failed: Application error
enter image description here console
enter image description here
atom

I want to download a package for ATOM


问:
Trying to implement GET request within a map function
I am have a map function which iterates through a list of stock tickers, on each iteration I want to perform a GET request using the stock ticker's. I am trying to perform the GET request within the map function like below:

```<code>import React from 'react';
import axios from 'axios';
import logo from './logo.svg';
import './App.css';
import { useEffect, useState } from 'react';
import { response } from 'express';

const App = () => {
  const [messages, setMessages] = useState([] as any[]);
  const [px, setPx] = useState([] as any[]);

  React.useEffect(() => {
    axios
      .get(
        'https://api.stocktwits.com/api/2/streams/trending.json',
        {}
      )
      .then((response) => {
        setMessages(response.data.messages);
      })
      .catch((ex) => {
        let error = axios.isCancel(ex)
          ? 'Request Cancelled'
          : ex.code === 'ECONNABORTED'
          ? 'A timeout has occurred'
          : ex.response.status === 404
          ? 'Resource Not Found'
          : 'An unexpected error has occurred';

        // setError(error);
        // setLoading(false);
      });
  }, []);

  console.log(messages);

  return (
    <div className="App">
      <table className="messages_table">
        <tr>
          <th>Tweeted at</th>
          <th>Tweet</th>
          <th>User</th>
          <th>Tweet sentiment</th>
          <th>Symbols mentioned</th>
        </tr>
        {messages.map((message) => (
          <tr>
            <td>{message.created_at}</td>
            <td>{message.body}</td>
            <td>
              {' '}
              {message.user.name} ({message.user.username})<br></br>{' '}
              Followers: {message.user.followers}
            </td>
            <td>{message.entities?.sentiment?.basic}</td>

            {message.symbols.map(
              (symbol: {
                symbol:
                  | string
                  | number
                  | boolean
                  | React.ReactElement<
                      any,
                      string | React.JSXElementConstructor<any>
                    >
                  | React.ReactFragment
                  | React.ReactPortal
                  | null
                  | undefined;
                title: string;
              }) => {
                let symb = symbol.symbol;
                const sendGetRequest = async () => {
                  try {
                    const resp = await axios.get(
                      `https://ql.stocktwits.com/batch?symbols=${symb}`
                    );
                    setPx(resp.data.symb.Volume);
                  } catch (err) {
                    // Handle Error Here
                  }
                };

                React.useEffect(() => sendGetRequest(), []);

                return (
                  <td>
                    {symbol.symbol} - ({symbol.title})<br></br>
                  </td>
                );
              }
            )}
          </tr>
        ))}
      </table>
    </div>
  );
};

export default App;
</code>```

However, I know using a HOOK within the callback isn't permitted but without it just constantly performs API request. Can someone suggest how I can get this working please

Body:
I am have a map function which iterates through a list of stock tickers, on each iteration I want to perform a GET request using the stock ticker's. I am trying to perform the GET request within the map function like below:

import React from 'react';
import axios from 'axios';
import logo from './logo.svg';
import './App.css';
import { useEffect, useState } from 'react';
import { response } from 'express';

const App = () => {
  const [messages, setMessages] = useState([] as any[]);
  const [px, setPx] = useState([] as any[]);

  React.useEffect(() => {
    axios
      .get(
        'https://api.stocktwits.com/api/2/streams/trending.json',
        {}
      )
      .then((response) => {
        setMessages(response.data.messages);
      })
      .catch((ex) => {
        let error = axios.isCancel(ex)
          ? 'Request Cancelled'
          : ex.code === 'ECONNABORTED'
          ? 'A timeout has occurred'
          : ex.response.status === 404
          ? 'Resource Not Found'
          : 'An unexpected error has occurred';

        // setError(error);
        // setLoading(false);
      });
  }, []);

  console.log(messages);

  return (

          Tweeted at
          Tweet
          User
          Tweet sentiment
          Symbols mentioned

        {messages.map((message) => (

            {message.created_at}
            {message.body}

              {' '}
              {message.user.name} ({message.user.username})

{' '}
              Followers: {message.user.followers}

            {message.entities?.sentiment?.basic}

            {message.symbols.map(
              (symbol: {
                symbol:
                  | string
                  | number
                  | boolean
                  | React.ReactElement<
                      any,
                      string | React.JSXElementConstructor<any>
                    >
                  | React.ReactFragment
                  | React.ReactPortal
                  | null
                  | undefined;
                title: string;
              }) => {
                let symb = symbol.symbol;
                const sendGetRequest = async () => {
                  try {
                    const resp = await axios.get(
                      `https://ql.stocktwits.com/batch?symbols=${symb}`
                    );
                    setPx(resp.data.symb.Volume);
                  } catch (err) {
                    // Handle Error Here
                  }
                };

                React.useEffect(() => sendGetRequest(), []);

                return (

                    {symbol.symbol} - ({symbol.title})

                );
              }
            )}

        ))}

  );
};

export default App;

However, I know using a HOOK within the callback isn't permitted but without it just constantly performs API request. Can someone suggest how I can get this working please


Title: How to calculate row wise harmonic mean in Pandas?

Body:
I have the following output of a dataframe:

   id     instrument_name    mark_price  underlying_price  expiry  open_interest  creation_timestamp
0   256  BTC-7DEC22-16750-C  1.581330e-02           16982.6  7DEC22           11.3 2022-12-06 14:44:23
1   257  BTC-7DEC22-15500-C  8.731920e-02           16982.6  7DEC22            0.0 2022-12-06 14:44:23
2   258  BTC-7DEC22-17000-C  6.213060e-03           16982.6  7DEC22           81.4 2022-12-06 14:44:23
3   259  BTC-7DEC22-19000-C  2.000000e-07           16982.6  7DEC22            0.0 2022-12-06 14:44:23
4   260  BTC-7DEC22-20000-C  2.000000e-07           16982.6  7DEC22            0.0 2022-12-06 14:44:23
5   261  BTC-7DEC22-16500-C  2.913910e-02           16982.6  7DEC22            0.0 2022-12-06 14:44:23
6   262  BTC-7DEC22-14000-C  1.756280e-01           16982.6  7DEC22            0.0 2022-12-06 14:44:23
7   263  BTC-7DEC22-17250-C  1.635240e-03           16982.6  7DEC22          170.1 2022-12-06 14:44:23
8   264  BTC-7DEC22-18000-C  4.315000e-05           16982.6  7DEC22           16.3 2022-12-06 14:44:23
9   265  BTC-7DEC22-16250-C  4.330510e-02           16982.6  7DEC22            0.0 2022-12-06 14:44:23
10  266  BTC-7DEC22-18500-C  1.450000e-06           16982.6  7DEC22           23.9 2022-12-06 14:44:23
11  267  BTC-7DEC22-15000-C  1.167540e-01           16982.6  7DEC22            0.0 2022-12-06 14:44:23
12  268  BTC-7DEC22-17500-C  2.745900e-04           16982.6  7DEC22          299.6 2022-12-06 14:44:23
13  269  BTC-7DEC22-17750-C  1.554700e-04           16982.6  7DEC22          161.7 2022-12-06 14:44:23
14  270  BTC-7DEC22-16000-C  5.792920e-02           16982.6  7DEC22            0.0 2022-12-06 14:44:23
15  241  BTC-7DEC22-16750-C  1.597490e-02           16986.6  7DEC22           11.3 2022-12-06 14:42:39
16  242  BTC-7DEC22-15500-C  8.753070e-02           16986.6  7DEC22            0.0 2022-12-06 14:42:39
17  243  BTC-7DEC22-17000-C  6.302300e-03           16986.6  7DEC22           81.4 2022-12-06 14:42:39
18  244  BTC-7DEC22-19000-C  2.100000e-07           16986.6  7DEC22            0.0 2022-12-06 14:42:39
19  245  BTC-7DEC22-20000-C  2.100000e-07           16986.6  7DEC22            0.0 2022-12-06 14:42:39
20  246  BTC-7DEC22-16500-C  2.934800e-02           16986.6  7DEC22            0.0 2022-12-06 14:42:39
21  247  BTC-7DEC22-14000-C  1.758190e-01           16986.6  7DEC22            0.0 2022-12-06 14:42:39
22  248  BTC-7DEC22-17250-C  1.662920e-03           16986.6  7DEC22          170.1 2022-12-06 14:42:39
23  249  BTC-7DEC22-18000-C  4.471000e-05           16986.6  7DEC22           16.3 2022-12-06 14:42:39
24  250  BTC-7DEC22-16250-C  4.352290e-02           16986.6  7DEC22            0.0 2022-12-06 14:42:39
25  251  BTC-7DEC22-18500-C  1.520000e-06           16986.6  7DEC22           23.9 2022-12-06 14:42:39

What I want is to calculate instrument_name wise harmonic mean. For instance BTC-7DEC22-16750-C has more than one values so I need the harmonic mean of those values and show in a new column df['hm']

I tried the following but it is showing NaN in hm column:

from statistics import harmonic_mean
df_call['HM'] = df_call.groupby('instrument_name').apply(
                lambda row: harmonic_mean(df_call['mark_price']))


问:
The text inside the svg is not visible when it overflows
```<code><div class="base">
<div class="headline">
  <svg>
    <clippath id="mask">
      <text dominant-baseline="hanging">Awesome Headline</text>
    </clippath>
  </svg>
</div>
</div>

<style>
body {
  background: url('https://images.pexels.com/photos/2179483/pexels-photo-2179483.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1')no-repeat;
  background-size:cover;

}
.headline {
  font: 50px system-ui, sans-serif;
  font-weight: 900;
  backdrop-filter:invert(100%);
  clip-path: url(#mask);
  letter-spacing:30px;
}
.base {
  position:absolute;
  top:20%;
  left:20%;
  width:400px;
  height:auto;
  background-color:red;
  transform: translate(-20%, -20%);
}
</style>
</code>```

(https://i.stack.imgur.com/iQbqc.png)

I want to do like in this picture.

I don't know if it's because of the svg but it overflows from the width I gave the base class.

what I want to do is to make the text go down to a bottom line

Body:
  <svg>
    <clippath id="mask">
      <text dominant-baseline="hanging">Awesome Headline</text>
    </clippath>
  </svg>

(https://i.stack.imgur.com/iQbqc.png)

I want to do like in this picture.

I don't know if it's because of the svg but it overflows from the width I gave the base class.

what I want to do is to make the text go down to a bottom line


问:
Spring boot. Endpoints inside swagger uses the ROLES from basic auth
I have a project in SPRING BOOT with some endpoints and swagger. Also the projects has RBAC (role based access control).
I made my own Authentication providers.
Endpoints are secured with an API KEY inside header(OncePerRequestFilter). (keys are stored in DB with the assignated roles).
The swagger is secured with BASIC AUTH, but it is overriden with my BasicAuthProvider(to use the username/password from database).

When I am logging in swagger, all endpoints doesn't need to introduce the api key, because when I logged in, probably in the SecurityContext exists the role from basic auth, so in Swagger page, there is no need to reintroduce the api key for every request. (Theoretically it is not STATELESS inside swagger).

I want to be stateless inside swagger. After loggin in, i want that each endpoint to request the api key inside header.

I tried to add in authentication EntryPoint:

```<code> response.addHeader("WWW-Authenticate", "Basic realm=" + this.getRealmName());
</code>```

But this is just adding the BasicAuth dialog inside browser.

Body:
I have a project in SPRING BOOT with some endpoints and swagger. Also the projects has RBAC (role based access control).
I made my own Authentication providers.
Endpoints are secured with an API KEY inside header(OncePerRequestFilter). (keys are stored in DB with the assignated roles).
The swagger is secured with BASIC AUTH, but it is overriden with my BasicAuthProvider(to use the username/password from database).

When I am logging in swagger, all endpoints doesn't need to introduce the api key, because when I logged in, probably in the SecurityContext exists the role from basic auth, so in Swagger page, there is no need to reintroduce the api key for every request. (Theoretically it is not STATELESS inside swagger).

I want to be stateless inside swagger. After loggin in, i want that each endpoint to request the api key inside header.

I tried to add in authentication EntryPoint:

 response.addHeader("WWW-Authenticate", "Basic realm=" + this.getRealmName());

But this is just adding the BasicAuth dialog inside browser.


问:
Migrated the application from spring to springboot, now not working on weblogic 12c
Springboot application is working fine on tomcat but not on weblogic 12c.
Migrated the application from spring to springboot, spring application was also working fine on weblogic 12c.

Schedulers and background functionalities are working fine but can't hit the controller.

Getting following message

Spring version : 4.1.4.RELEASE
Springboot version : 2.6.3
Java : java 8
Tomcat : v9.0.69

```<code>@Controller
public class LoginController  {

   @ResponseBody
   @RequestMapping(value="/login",method=RequestMethod.GET)
   public String getLoginPage(Model model){

      log.info("request for login page");

      return "login.jsp";
   }
}
</code>```

weblogic.xml

```<code><?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
   <wls:weblogic-version>12.2.1.3</wls:weblogic-version>
   <wls:context-root>/TEST</wls:context-root>

   <wls:container-descriptor>
      <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
      <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
   </wls:container-descriptor>

   <wls:charset-params>
      <wls:input-charset>
         <wls:resource-path>/</wls:resource-path>
         <wls:java-charset-name>UTF-8</wls:java-charset-name>
      </wls:input-charset>
   </wls:charset-params>
</wls:weblogic-web-app>
</code>```

pom.xml -> https://file.io/YOQgpUI29Amq

Created a test project with same springboot version and test controller : worked fine on weblogic 12c.

Body:
Springboot application is working fine on tomcat but not on weblogic 12c.
Migrated the application from spring to springboot, spring application was also working fine on weblogic 12c.

Schedulers and background functionalities are working fine but can't hit the controller.

Getting following message

Spring version : 4.1.4.RELEASE
Springboot version : 2.6.3
Java : java 8
Tomcat : v9.0.69

@Controller
public class LoginController  {

   @ResponseBody
   @RequestMapping(value="/login",method=RequestMethod.GET)
   public String getLoginPage(Model model){

      log.info("request for login page");

      return "login.jsp";
   }
}

weblogic.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
   <wls:weblogic-version>12.2.1.3</wls:weblogic-version>
   <wls:context-root>/TEST</wls:context-root>

   <wls:container-descriptor>
      <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
      <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
   </wls:container-descriptor>

   <wls:charset-params>
      <wls:input-charset>
         <wls:resource-path>/</wls:resource-path>
         <wls:java-charset-name>UTF-8</wls:java-charset-name>
      </wls:input-charset>
   </wls:charset-params>
</wls:weblogic-web-app>

pom.xml -> https://file.io/YOQgpUI29Amq

Created a test project with same springboot version and test controller : worked fine on weblogic 12c.


问:
Borrow checker issue when copying slice in vector or vectors
Suppose that you have multiple stacks represented as vectors and you want to move data from one of the stacks to another. A convenient and "Rustic" way to do that is to use extend_from_slice to extend one vector with a slice from the other vector without copying it, like this:

fn main() {
    let mut s1 = vec![1, 2, 3];
    let mut s2 = vec![];

    println!("before #{}: {:?}", 1, s1);
    println!("before #{}: {:?}", 2, s2);

    s2.extend_from_slice(&s1[1..]);
    s1.truncate(1);

    println!("after  #{}: {:?}", 1, s1);
    println!("after  #{}: {:?}", 2, s2);
}
```
<p>This compiles fine and implements the move.</p>
<p>Now, if you want to support multiple vectors, even a variable number of them, you can store them as a vector of vectors, like this:</p>
<pre class="lang-rust prettyprint-override"><code>fn main() {
    let mut stacks = vec![vec![1, 2, 3], vec![2, 3, 4], vec![]];

    for (n, stack) in stacks.iter().enumerate() {
        println!("before #{}: {:?}", n, stack);
    }

    stacks[2].extend_from_slice(&stacks[1][1..]);
    stacks[1].truncate(1);

    for (n, stack) in stacks.iter().enumerate() {
        println!("after  #{}: {:?}", n, stack);
    }
}
</code>```

However, if you try this trick to append a slice from one of the vectors to another, the borrow-checker will complain:

```<code>error[E0502]: cannot borrow `stacks` as immutable because it is also borrowed as mutable
  --> examples/vector_vector_move.rs:10:34
   |
10 |     stacks[2].extend_from_slice(&stacks[1][1..]);
   |     ------    -----------------  ^^^^^^ immutable borrow occurs here
   |     |         |
   |     |         mutable borrow later used by call
   |     mutable borrow occurs here
</code>```

Since the slice to move is from a different vector than the slice to extend, there should be no safety issues with performing the move. Rationale is that the "top-level" vector does not need to change size, it is only the inner vectors that need to change size.

Trying to split out the slice into a separate variable give the same error as before, and storing references to vectors instead of vectors directly gives a whole bunch of other errors saying similar things as above.

Is there a way to move a slice of a vector to another vector in a vector of vectors without creating a copy of the slice first?

Body:
Suppose that you have multiple stacks represented as vectors and you want to move data from one of the stacks to another. A convenient and "Rustic" way to do that is to use extend_from_slice to extend one vector with a slice from the other vector without copying it, like this:

fn main() {
    let mut s1 = vec![1, 2, 3];
    let mut s2 = vec![];

    println!("before #{}: {:?}", 1, s1);
    println!("before #{}: {:?}", 2, s2);

    s2.extend_from_slice(&s1[1..]);
    s1.truncate(1);

    println!("after  #{}: {:?}", 1, s1);
    println!("after  #{}: {:?}", 2, s2);
}

This compiles fine and implements the move.

Now, if you want to support multiple vectors, even a variable number of them, you can store them as a vector of vectors, like this:

fn main() {
    let mut stacks = vec![vec![1, 2, 3], vec![2, 3, 4], vec![]];

    for (n, stack) in stacks.iter().enumerate() {
        println!("before #{}: {:?}", n, stack);
    }

    stacks[2].extend_from_slice(&stacks[1][1..]);
    stacks[1].truncate(1);

    for (n, stack) in stacks.iter().enumerate() {
        println!("after  #{}: {:?}", n, stack);
    }
}

However, if you try this trick to append a slice from one of the vectors to another, the borrow-checker will complain:

error[E0502]: cannot borrow `stacks` as immutable because it is also borrowed as mutable
  --> examples/vector_vector_move.rs:10:34
   |
10 |     stacks[2].extend_from_slice(&stacks[1][1..]);
   |     ------    -----------------  ^^^^^^ immutable borrow occurs here
   |     |         |
   |     |         mutable borrow later used by call
   |     mutable borrow occurs here

Since the slice to move is from a different vector than the slice to extend, there should be no safety issues with performing the move. Rationale is that the "top-level" vector does not need to change size, it is only the inner vectors that need to change size.

Trying to split out the slice into a separate variable give the same error as before, and storing references to vectors instead of vectors directly gives a whole bunch of other errors saying similar things as above.

Is there a way to move a slice of a vector to another vector in a vector of vectors without creating a copy of the slice first?


问:
deployment of shiny app fails due to cmake
I have a shiny app that uses nloptr , which in turns needs cmake. I installed it locally and everything works, when I try to publish it to an private rsconnect server, it fails with the following error:

[Connect] 2022/12/06 14:24:08.680333733 CMake was not found on the PATH. Please install CMake: ...

So it is clear that the compiler is missing, is there any solution besides asking the server admin to install cmake or a way for R to install it?


问:
Lines to separate x-axis labels in matplotlib
I would like to separate my labels on the x-axis according to their category (female/male).

I have the following code:

import matplotlib.pyplot as plt
import pandas as pd

if __name__=='__main__':
    data = {
        'Ava': 30,
        'Charlotte': 32,
        'Sophia': 41,
        'Mark': 33,
        'William': 50
    }

    data_df = pd.DataFrame(data, index=[0]).T
    data_df.plot(kind='bar', rot=0, edgecolor='black', legend=False)

    plt.title('Age')
    plt.savefig('ages.png')
```
<p>It produces the following plot</p>
<p>I want to add lines to group x-axis labels according to gender.</p>
```FEMALE = ['Ava', 'Charlotte', 'Sophia']
MALE = ['Mark', 'William']
```

And obtaining something like this

How can I do it?

Body:
I would like to separate my labels on the x-axis according to their category (female/male).

I have the following code:

import matplotlib.pyplot as plt
import pandas as pd

if __name__=='__main__':
    data = {
        'Ava': 30,
        'Charlotte': 32,
        'Sophia': 41,
        'Mark': 33,
        'William': 50
    }

    data_df = pd.DataFrame(data, index=[0]).T
    data_df.plot(kind='bar', rot=0, edgecolor='black', legend=False)

    plt.title('Age')
    plt.savefig('ages.png')

It produces the following plot

I want to add lines to group x-axis labels according to gender.

FEMALE = ['Ava', 'Charlotte', 'Sophia']
MALE = ['Mark', 'William']

And obtaining something like this

How can I do it?


问:
Dump SQL Server database schema with `sqlcmd`
I need to automate database schema dumping via scripts. I have the restriction of only having sqlcmd available, so I can not use/install mssql-scripter or other tools.

Do you know if it is possible to generate the schema files and stored procedures with plain sqlcmd?


问:
Jira project automation (Issue type - Test)(Zephyr TestStep)
Maybe any one can help,
I am trying to create Project automation in Jira and using automation rule.
Condition in issue transitioned from one status to other then create a new task.

Everythin is working if I am creating new story, but I would like to create new Test issue.
But I am getting error that Zephyr Test Step is required (custom field xx) I can not choose this field from the list, is not visible, and I do not know how to use json window..

any one have ideas?


问:
React Data Table sorting not working and rendering it to the first page
When I am sorting in other than page 1 it is rendering me to page 1 i am using react data table library

is there any suggestion


问:
Non blocking message box in Windows with Python
I need message popup that will not require user interaction for script that runs it to continue. I have tried:

```<code>import win32ui
win32ui.MessageBox("Message", "Title")
</code>```

and:

```<code>import ctypes
ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 1)
</code>```

They both require user to click on the message for script to continue. I just need a popup and script to continue to run without any interaction.

Body:
I need message popup that will not require user interaction for script that runs it to continue. I have tried:

import win32ui
win32ui.MessageBox("Message", "Title")

and:

import ctypes
ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 1)

They both require user to click on the message for script to continue. I just need a popup and script to continue to run without any interaction.


问:
tui-image-editor IIncludeUIOptions['locale'] not declared in index.d.ts
```<code> const newInstance = new TuiImageEditor(someElement, {
        includeUI: {
          locale: localFactory(),
        },
      })
</code>```

Cannot find declaration property for interface.So,I try to use as,and then

```<code>import ImageEditor, { IOptions } from "tui-image-editor";

 const newInstance = new TuiImageEditor(someElement, {
        includeUI: {
          locale: localFactory() as IOptions,
        },
      })
</code>```

This is OK.Is there any other way???

Body:
 const newInstance = new TuiImageEditor(someElement, {
        includeUI: {
          locale: localFactory(),
        },
      })

Cannot find declaration property for interface.So,I try to use as,and then

import ImageEditor, { IOptions } from "tui-image-editor";

 const newInstance = new TuiImageEditor(someElement, {
        includeUI: {
          locale: localFactory() as IOptions,
        },
      })

This is OK.Is there any other way???


问:
Display Username, Amount Based on Current Date as against date amount was loaded

Date
Username
Amount

12/6/2022
Klington
3000

12/6/2022
Claire
5000

12/6/2022
Sainz
32000

12/6/2022
Slip
5000

I have tried using index match likewise VlooUP to list all the amount based on current date today().


问:
How can I keep alive the localhost even after I close the vscode
I want to run my vue application to run on port 8080 even I close the vscode. Is that possible in any way. What is happening in my case if I close the vscode accidently localhost stops working.</p>


问:
Unit testing internal function in react
I want to snapshot testing (jest) just this chuck of logic of my react component. The problem is handle1 and handle2 aren't (of course) pure functions, they depend on other functions in View component, therefore I can't move the 2 lines (#4-5) in a utility function to export. What could be the best approach to this?

```<code>1    export default function View() {
2      return (
3        ...
4        {CASE1 || CASE2 && (<SidebarButton onClick={handle1}>one</SidebarButton>)}
5        {CASE2 && (<SidebarButton onClick={handle2}>two</SidebarButton>)}
6        ...
7       )
8    }
</code>```

Title: Unit testing internal function in react

Body:
I want to snapshot testing (jest) just this chuck of logic of my react component. The problem is handle1 and handle2 aren't (of course) pure functions, they depend on other functions in View component, therefore I can't move the 2 lines (#4-5) in a utility function to export. What could be the best approach to this?

1    export default function View() {
2      return (
3        ...
4        {CASE1 || CASE2 && (<SidebarButton onClick={handle1}>one</SidebarButton>)}
5        {CASE2 && (<SidebarButton onClick={handle2}>two</SidebarButton>)}
6        ...
7       )
8    }