<commit_before>component extends="org.lucee.cfml.test.LuceeTestCase"{
	function run( testResults , testBox ) {
		describe( "test case for LDEV-380", function() {
			
			it(title = "Checking cfthread action = 'join', from a sister thread", body = function( currentSpec ) {
				request.hasError1 = "";
				thread name="T1" action="run"{
					sleep(100);
				}
				thread name="T2" action="run"{
					sleep(1);
					try{
						thread action="join" name="T1" timeout="5000";
					} catch( any e){
						request.hasError1 = e.message;
					}
				}
				sleep(200);
				expect(request.hasError1).toBe("");
			});

			it(title = "Checking cfthread action = 'join', from a uncle thread", body = function( currentSpec ) {
				request.hasError3 = "";
				thread name="x1" action="run"{
					sleep(100);
				}
				thread name="x2" action="run"{
					thread name="x2.1" action="run"{
						sleep(1);
						try{
							thread action="join" name="x1" timeout="5000";
						} catch( any e){
							request.hasError3 = e.message;
						}
					}
				}
				sleep(200);
				expect(request.hasError3).toBe("");
			});

			it(title = "Checking cfthread action = 'join', from a cousin thread", body = function( currentSpec ) {
				request.hasError4 = "";
				thread name="w1" action="run"{
					thread name="w1.1" action="run"{
						sleep(100);
					}
				}
				thread name="w2" action="run"{
					thread name="w2.1" action="run"{
						sleep(1);
						try{
							thread action="join" name="w1.1" timeout="5000";
						} catch( any e){
							request.hasError4 = e.message;
						}
					}
				}
				sleep(200);
				expect(request.hasError4).toBe("");
			});
			
			it(title = "Checking cfthread action = 'join', from a grand child thread", body = function( currentSpec ) {
				request.hasError2 = "";
				thread name="TT1" action="run"{
					thread name="TT1.1" action="run"{
						sleep(100);
					}
				}
				sleep(5);

				try{
					thread action="join" name="TT1.1" timeout="5000";
				} catch( any e){
					request.hasError2 = e.message;
				}
				sleep(400);

				expect(request.hasError2).toBe("");
			});


		});
	}
}<commit_msg>improve test case<commit_after>component extends="org.lucee.cfml.test.LuceeTestCase"{
	function run( testResults , testBox ) {
		describe( "test case for LDEV-380", function() {
			
			it(title = "Checking cfthread action = 'join', from a sister thread", body = function( currentSpec ) {
				request.hasError1 = "";
				thread name="T1" action="run"{
					sleep(100);
				}
				thread name="T2" action="run"{
					sleep(1);
					try{
						thread action="join" name="T1" timeout="5000";
					} catch( any e){
						request.hasError1 = e.message;
					}
				}
				sleep(200);
				expect(request.hasError1).toBe("");
			});

			it(title = "Checking cfthread action = 'join', from a uncle thread", body = function( currentSpec ) {
				request.hasError3 = "";
				thread name="x1" action="run"{
					sleep(100);
				}
				thread name="x2" action="run"{
					thread name="x2.1" action="run"{
						sleep(1);
						try{
							thread action="join" name="x1" timeout="5000";
						} catch( any e){
							request.hasError3 = e.message;
						}
					}
				}
				sleep(200);
				expect(request.hasError3).toBe("");
			});

			it(title = "Checking cfthread action = 'join', from a cousin thread", body = function( currentSpec ) {
				request.hasError4 = "";
				thread name="w1" action="run"{
					thread name="w1.1" action="run"{
						sleep(100);
					}
				}
				thread name="w2" action="run"{
					thread name="w2.1" action="run"{
						sleep(1);
						try{
							thread action="join" name="w1.1" timeout="5000";
						} catch( any e){
							request.hasError4 = e.message;
						}
					}
				}
				sleep(200);
				expect(request.hasError4).toBe("");
			});
			
			it(title = "Checking cfthread action = 'join', from a grand child thread", body = function( currentSpec ) {
				request.hasError2 = "";
				thread name="TT1" action="run"{
					thread name="TT1.1" action="run" {
						sleep(100);
					}
				}
				sleep(50);

				thread action="join" name="TT1.1" timeout="5000";
			});


		});
	}
}
{'fraction_non_alphanumeric': 0.16893865628042842, 'fraction_numerical': 0.0379746835443038, 'mean_word_length': 2.598073555166375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3797061', 'n_tokens_mistral': 1958, 'n_tokens_neox': 1387, 'n_words': 302}