Happens-Before....Java Memory Model
"Java Memory Model (JMM) defines a partial ordering called happens-before on all actions with the program. Actions are reads and writes to variables, locks and unlocks of monitors etc. To guarantee that the thread executing action B can see the results of action A, there must be happens before relationship between A and B. In the absence of happens-before ordering between two operations, the JVM is free to re-order them as it pleases (due to the fact that every processor has it's cache and it needs to flush to the main memory). A correctly synchronized program is one with no data races, correctly synchronized programs exhibits sequential consistency, meaning that all actions within the program appear to happen in a fixed, global order.
The rules for happens-before are:
Program order rule. Each action in a thread happens-before every action in that thread that comes later in the program order.
Monitor lock rule. An unlock on a monitor lock happens-before every subsequent lock on that same monitor lock.
Volatile variable rule. A write to a volatile field happens-before every subsequent read of that same field.
Thread start rule. A call to Thread.start on a thread happens-before any other rhread detects taht thread has terminated, either by successfully return from Thread.join or by Thread.isAlive returning false.
Interruption rule. A thread calling interrupt on another thread happens-before the interrupted thread detects the interrupt( either by having InterruptedException thrown, or invoking isInterrupted or interrupted).
Finalizer rule. The end of a constrcutor for an object happens-before the start of the finalizer for that obejct.
Transitivity. If A happens-before B, and B happens-before C, then A happens-before C.
"
Ref: Java Concurrency in Pratice
The rules for happens-before are:
Program order rule. Each action in a thread happens-before every action in that thread that comes later in the program order.
Monitor lock rule. An unlock on a monitor lock happens-before every subsequent lock on that same monitor lock.
Volatile variable rule. A write to a volatile field happens-before every subsequent read of that same field.
Thread start rule. A call to Thread.start on a thread happens-before any other rhread detects taht thread has terminated, either by successfully return from Thread.join or by Thread.isAlive returning false.
Interruption rule. A thread calling interrupt on another thread happens-before the interrupted thread detects the interrupt( either by having InterruptedException thrown, or invoking isInterrupted or interrupted).
Finalizer rule. The end of a constrcutor for an object happens-before the start of the finalizer for that obejct.
Transitivity. If A happens-before B, and B happens-before C, then A happens-before C.
"
Ref: Java Concurrency in Pratice
I tried Google News today
Broken code?
mid = (low + high)/2
mid = low + ((high-low)/2)
mid,low and high are int.
What's the difference?
context: Java, C, C++
Ideas Appreciated!
mid = low + ((high-low)/2)
mid,low and high are int.
What's the difference?
context: Java, C, C++
Ideas Appreciated!
Inactive for Couple of Days
Due to large learning curve of new job, keeping myself busy with new environment and new people. Stepping ahead as a Senior Software Engineer, got more responsibility and need broader knowledge . Stopped working on Tellurium for a while.
Will be back in couple of days.
Will be back in couple of days.
Tellurium-Reference is finally released
With the extra effort from all the team members, tellurium-reference guide is finally released. Hats-off to Jian Fang's work.
Please take a look to our effort on how this framework is changing the era of web testing.
Tellurium-Reference Guide
Further reference link:
Wiki
Google Code
Tellurium Home Page
Please take a look to our effort on how this framework is changing the era of web testing.
Tellurium-Reference Guide
Further reference link:
Wiki
Google Code
Tellurium Home Page
Tellurium: A new concept of UI testing
It's great fun working on this innovative open source project. I have never contributed to any open source project before besides commenting "Awesome Project....Keep Going". But now it's no more like that.
Yeah, the TELLURIUM, a wonderful open source web testing framework which is build on top of Selenium framework but with different testing concept. We are working on to build our own core engine and consequently remove the Selenium. Most existing web testing framework focus on individual UI element such as links and buttons. Tellerium takes a new approach for automated web testing by using the concept of UI module.
UI module is a collection of UI elements grouped together. Tellurium is build on the foundation of UI module. The UI module makes it possible to build locators for UI elements at runtime. Tellurium is implemented using Groovy and Java. The test cases can be written in Java, Groovy, or pure DSL scripts. Tellurium enforce UI model separate for the test code, making refactoring easy.
I will definitely update more about TELLURIUM on up coming posts.
Yeah, the TELLURIUM, a wonderful open source web testing framework which is build on top of Selenium framework but with different testing concept. We are working on to build our own core engine and consequently remove the Selenium. Most existing web testing framework focus on individual UI element such as links and buttons. Tellerium takes a new approach for automated web testing by using the concept of UI module.
UI module is a collection of UI elements grouped together. Tellurium is build on the foundation of UI module. The UI module makes it possible to build locators for UI elements at runtime. Tellurium is implemented using Groovy and Java. The test cases can be written in Java, Groovy, or pure DSL scripts. Tellurium enforce UI model separate for the test code, making refactoring easy.
I will definitely update more about TELLURIUM on up coming posts.
Subscribe to:
Posts (Atom)


